I was trying to set up remote access to the LAN of an OpenVPN client, by configuring the OpenVPN client as a gateway. There are plenty guides online on how to do this, such as this one. In my setup, I was using a Netgear router, with a Raspberry Pi connected to it acting as the OpenVPN client and gateway for the LAN. I followed the setup carefully, but was frustrated to find it didn't work. The VPN worked fine: I could access the Raspberry Pi remotely, both on its VPN IP and its LAN IP addresses. Still, I could not gain access to the LAN it was connected to, even though I had set up a static route in the router to send all VPN traffic to the Raspberry Pi.

After breaking my head over this for a long time and getting very frustrated, I finally figured out what was going on. I needed to enable IP forwarding on the Raspberry Pi! To do this in such a way it is configured correctly at boot, uncomment the following line in /etc/sysctl.conf:

net.ipv4.ip_forward=1

That's it! After that, my setup worked beautifully. Hopefully this will save someone else some time and frustration. :-)

This blog post was posted to Techie Brain Showers on Tuesday July 29th, 2014 at 9:44PM
 

Leave a Comment

You can use bbcode in the comment: e.g. [b]This is bold[/b], [url]http://www.achanceofbrainshowers.com[/url], [code python]import this[/code]
Preview Posting...
Previewing comment, please wait a moment...

My name is Patrick Van Oosterwijck. Welcome to my spot on the web where I will hopefully regularly dump some of my brain content for the benefit of whomever may find it useful.

You are reading my tech blog. See the homepage for my other blogs.

Search for Posts
Possibly related posts
Tags
Popular Tags
 
Archives
2015
 
 
© 2010 Patrick Van Oosterwijck.

Using technoblog blog engine by Will McGugan