Jump to content

Recommended Posts

Posted

Every time I restart my openvpn server, I need to manually type the following command, so that the VPN clients can see other devices on the remote network.

 

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

 

Is there anything I can set so that it will remember this setting, or is the only option to just add it to a startup script or something

Posted
iptables-save ?

 

Is that all i need to do? hah, this has been bugging me for about a year. ..

 

powdarrrmonkey, Is that necessary or will kmonts suggestion do?

 

Cybernerd, I dont even use iptables as a firewall, i just found that the only way to do what I wanted with openvpn was to envoke that command...

Posted

On gentoo, you should be able to use /etc/init.d/iptables save which will dump it into /var/lib/iptables/rules-save and then when /etc/init.d/iptables start is ran on boot up it should load them back as below.

 

/etc/init.d/iptables save
* Saving iptables state 

/etc/init.d/iptables stop
* Saving iptables state  
* Stopping firewall 

/etc/init.d/iptables start
* Loading iptables state and starting firewall 

  • Thanks 1
Posted

I thought there might be some gentoo magic.

 

@RB: it's the same thing: iptables-save just spits out a machine-interpreted dump of the current state. You have to put it somewhere though.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...