0

I have a CentOS server configured as a PPTP VPN Server.

The client is a Windows 7 with "Use default gateway on remote network" in advanced TCP/IPv4 properties enable. He can connect to CentOS without any problem and can access to:

  • The Box of his ISP (http://192.168.1.254/)
  • The CentOS server
  • The website which is hosted by the server (through http://)

But he canNOT access any other web service (google.com or 74.125.230.224)

I am a beginner with web servers so I do not know what can cause this problem.

  • Note 0 : The Windows 7 user must be able to access the whole internet through the CentOS PPTP proxy.
  • Note 1 : With "Use default gateway on remote network" in advanced TCP/IPv4 UNCHECKED it is the same problem
  • Note 2 : With "Use default gateway on remote network" in advanced TCP/IPv4 UNCHECKED AND "disable class based route addition" CHECKED the Win 7 can access google but with the ISP IP (no use of the VPN...)
    See Screenshot
  • Note 3 : I have made a echo 1 > /proc/sys/net/ipv4/ip_forward and a iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
1

I have found the solution.

There was a script in my server which did, at every reboot : echo 0 > /proc/sys/net/ipv4/ip_forward and a REMOVE(iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE) ...

I added a startup shell with :

echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Everything works like a charm !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.