OpenVZ Forum


Home » General » Support » *SOLVED* OpenVPN in VPS : Masquerade
Re: *SOLVED* OpenVPN in VPS : Masquerade [message #45251 is a reply to message #8117] Mon, 20 February 2012 18:46 Go to previous message
x100 is currently offline  x100
Messages: 2
Registered: February 2012
Junior Member
If anybody still interested. Checked the above rule and it did not actually let me access external resources being connected to the VPN server. I got connected to the server being able to ping external addresses this way, but there was no route to them through the VPN tunnel (when tracerouting). To be fully able to reach the external net through the VPN server I use the following:

iptables -t nat -A POSTROUTING -j SNAT --to-source <venet's IP>


And don't forget enabling IP forwarding in /etc/sysctl.conf:

net.ipv4.ip_forward = 1
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Do ARP packets to announce the container IP
Next Topic: Inbound bandwidth speed problem
Goto Forum:
  


Current Time: Tue Aug 13 14:24:52 GMT 2024

Total time taken to generate the page: 0.02943 seconds