change to snat
I have an issue on my server whereby I connect to xx.xxx.xxx.199 via VPN.
However, on viewing my IP address at the client it says it is xx.xxx.xxx.198, which is the main IP address of the server and probably send the reply out on that address as that is the main eth0.
How can I change this in iptables to make sure that that doesn;t happen and that the reply comes out on 199?
:OUTPUT ACCEPT [8:3135]
-A PREROUTING -d xx.xxx.xxx.199 -p tcp -m tcp --dport 443 -j DNAT --to-destination xx.xxx.xxx.199:1194
-A POSTROUTING -s 172.16.0.0/255.255.255.0 -o eth0 -j MASQUERADE
-A POSTROUTING -s 10.8.0.0/255.255.255.0 -o eth0 -j MASQUERADE