Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i have openvpn server and the client are able connect to the server by ( openvpn Gui ver2.2beta5 ) but the clients can't surf the internet what can i do to solve this problem??????

thanks all

share|improve this question
up vote 0 down vote accepted

Ensure your IP forwarding is enabled:

sysctl net.ipv4.ip_forward=1
echo "sysctl net.ipv4.ip_forward = 1" >> /etc/sysctl.conf

NAT is configured right:

iptables -v -t nat -A POSTROUTING -o EXTERNAL_IF -s -j SNAT --to-source SERVER_IP

And default gateway is set correctly:

push "redirect-gateway def1"
push "route-gateway"
share|improve this answer
You are making a lot of assumptions here, I think we might need a lot more detail from the OP. – DutchUncle Jan 24 '11 at 23:44
how can i get this config – ahmed Jan 25 '11 at 7:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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