Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

My ubuntu server has two if: eth0, eth1.

eth0: Public IP  

I've configure down eth0 for a vpn server using pptpd.

The vpn ip_range is

bcrelay eth2

Now from my client can connect to vpn server and get address.

But I can't access anything in LAN network.

I've try to setup iptables -A FORWARD -j ACCEPT and also a -t nat settings.

But seems no effects.

How to done this work correct?

Thanks a lot.

Here is my server and client related info

share|improve this question
Welcome to Ask Ubuntu! Do you have IPv4 forwarding enabled for your kernel? Please post the output of cat /proc/sys/net/ipv4/conf/*/forwarding. And what does the route table look like on the clients? (post the output of route -n on the client) – gertvdijk Jan 20 '13 at 1:43
all results for cat /proc/sys/net/ipv4/conf/*/forwarding is 1, I think forwarding options is enable. Should I set route manually in vpn client? – lyhcode Jan 23 '13 at 6:36
No, you should push the route from the server (if possible, I've worked with OpenVPN). The client can't read the route from the sky, you know. :) Just post all relevant configuration files and the route tables. – gertvdijk Jan 23 '13 at 7:25
I use the pptpd. I would try the OpenVPN to solve this problem. My configurations and network stats posted to Is there anything missing there? Please help. Thanks a lot. – lyhcode Jan 25 '13 at 16:08
I've found this OpenVPN guide. Is bridged VPN help? – lyhcode Jan 25 '13 at 16:10

I've found a solutions and has been tested. It just works.

My ubuntu server has two network interfaces: eth1 - wan eth2 - lan

And the VPN service use as its address.

VPN client will get an address from

Following commands let VPN clients access to the other clients behind the server's LAN. e.g.

Using iptables to setup nat.

# ubuntu vpn server 
sudo iptables -t nat -A POSTROUTING -s -d -j MASQUERADE

And client add route manually.

# mac os x client
sudo route add
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.