Good day all .
I have Openvpn Server installed in a Linux server and I can access Internet through it
I have 2 Public IPs
( Physical )eth0 - xxx.xxx.xxx.xxx
eth0:1 - yyy.yyy.yyy.yyy
[real ip changed]
I can run server(Bind) on both IP and from my desktop I can connect to openvpn server on both IPs
But the problem is if I run openvpn server in yyy.yyy.yyy.yyy and from my desktop if i open ip2location dot com or similar site it reports IP - xxx.xxx.xxx.xxx in my browser.
because I forward it to eth0 which has IP - xxx.xxx.xxx.xxx
iptables -t nat -A POSTROUTING -s 172.18.0.0/24 -o [b]eth0 [/b]-j MASQUERADE
So I need to have something like following
iptables -t nat -A POSTROUTING -s 172.18.0.0/24 -o [b]eth0:1 [/b]-j MASQUERADE
so that outgoing packet from my box has source IP [ eth0:1 - yyy.yyy.yyy.yyy ] so that those site can report IP as
yyy.yyy.yyy.yyy.
But the problem is if I run
iptables -t nat -A POSTROUTING -s 172.18.0.0/24 -o [b]eth0:1 [/b]-j MASQUERADE
or
iptables -t nat -A POSTROUTING -s 172.18.0.0/24 -o [b]eth1 [/b]-j MASQUERADE
I can not access Internet at all.
Can you please focus some light.
Thank you