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 am trying to configure PPTPD on my Ubuntu box to pass all VPN traffic through to it's internet connection, so I essentially want it to work like a Proxy.

I think the problem is that no default gateway is being assigned to my PPTP client (Windows 7). I can connect to the VPN fine, I get an IP address and DNS servers but no default gateway.

Do I need to configure a specific option to tell the VPN server to forward all traffic it receives down it's eth0 port and out to the internet.


share|improve this question
I also need an answer to this question. I've added a bounty ;) – Unkwntech Dec 20 '10 at 7:15
Would you please copy/paste your route print? – Ehsan Dec 21 '10 at 0:36
In my case there are no custom routes. – Unkwntech Dec 21 '10 at 17:13
I didn't mean that, let me ask the question in other words, When I connect to me vpn server, it assign me an IP address like and also it's my default gateway. what about your case? You also should have a route to your vpn server trough the former gateway. do you have that? It's better if you copy/paste your route print :-) – Ehsan Dec 21 '10 at 18:05

Have you done setup of nat on your ubuntu box?

Here is example how to do it using iptables hope it will help you


# iptables executable lives here
# renaming of our interfaces for better usability
# externail interface 
# internal interface
# flushing all of our rules
# switching on NAT 
# - is an internal network behind our linux box

# optional tuning
# allow ssh connections to linux box
$IPTABLES -A INPUT --protocol tcp --dport 22 -j ACCEPT
# allow connections to http server on linux box
$IPTABLES -A INPUT --protocol tcp --dport 80 -j ACCEPT
# deny all other connections

# port forwarding
# vnc
iptables -A PREROUTING -t nat -i $EXTIF -p tcp --dport 5900 -j DNAT --to
iptables -A INPUT -p tcp -m state --state NEW --dport 5900 -i $EXTIF -j ACCEPT
# samba
iptables -A PREROUTING -t nat -i $EXTIF -p tcp --dport 139 -j DNAT --to
iptables -A INPUT -p tcp -m state --state NEW --dport 139 -i $EXTIF -j ACCEPT
iptables -A PREROUTING -t nat -i $EXTIF -p tcp --dport 445 -j DNAT --to
iptables -A INPUT -p tcp -m state --state NEW --dport 445 -i $EXTIF -j ACCEPT
share|improve this answer
Helped me a lot, thank you! – Dmitry Verkhoturov Aug 31 '12 at 21:15

Which default gateway do you want, remote or local?

windows pptp vpn client *do not* use default gateway on remote network

share|improve this answer

I found that uncommenting these two lines in /etc/ppp/pptpd-options;



and replacing them with the ip address of your router/modem did the trick.

share|improve this answer

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.