On Sat, Sep 26, 2015 at 08:45:13PM +0000, Martijn Grooten wrote:
Following the recent upgrade and reboot of my Bitfolk
server, OpenVPN
had stopped working. (I don't use it very often on that server; hence I
hadn't noticed.)
After some trying, the issue turned out to be that the server had
stopped functioning as a router - I thought I'd share what I did to make
it work, in case others run into the same problem.
I ran
echo 1 > /proc/sys/net/ipv4/ip_forward
modprobe tun
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
/etc/init.d/openvpn restart
Not sure if all of these were needed - the iptables one definitely was
as that was the one that fixed it.
Is there an easy way to make these changes permanent so that they will
survive a future reboot?
In /etc/sysctl.d add (a file with) the line
net.ipv4.ip_forward=1
Hugo.
--
Hugo Mills | Geek, n.:
hugo@... carfax.org.uk | Circus sideshow performer specialising in the eating
http://carfax.org.uk/ | of live animals.
PGP: E2AB1DE4 | OED