nat forward openvpn
I am trying to do a NAT forward in iptables but get the following error:
Quote:
I have an OpenVON server running and I need the client to use the ports on the OpenVPN server |
I don't understand why you try to nat the tun0
|
Quote:
I need all ports from my local computer to be forwarded to OpenVPN and then go out to the net so I can have the Linux box's IP address as a geo specific IP address. |
If i understand right :
You use a mobile (i mean desktop or laptop) computer anywhere in the world, then you connect to your OpenVPN server, and you want the real IP adress (not the vpn one's) of the mobile computer to be geo-localized. |
Quote:
So, my IP currently is 1.2.3.4, the server is 10.2.3.4 When I connect by VPN but open up a browser on my laptop and go to whatsmyip, it should say 10.2.3.4 I believe that's why the nat routing was needed. |
Quote:
According to this article on openvpn.net you need to add the following to your server config-file: push "redirect-gateway def1" If you only want this behaviour for one client you can put it in the client-config-dir file. |
Quote:
|
Quote:
Thanks |
You can use prerouting with -i. But if you are talking about postrouting, you should be using your external interface with -o switch, is not it? Postrouting option will take effect on the packets as they are just about to leave the linux box, so it should be taking care of the packets that are leaving from the external interface and not your internal.
Also you can try using masquerade option with postrouting if you want routing. |
All times are GMT -5. The time now is 06:42 AM. |