*nix Thread, openvpn / iptables in Technical; Every time I restart my openvpn server, I need to manually type the following command, so that the VPN clients ...
-
4th August 2009, 10:27 AM #1 openvpn / iptables
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.
Code:
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
-
-
IDG Tech News
-
4th August 2009, 10:34 AM #2
-
Thanks to kmount from:
RabbieBurns (4th August 2009)
-
4th August 2009, 12:19 PM #3 I do Code:
iptables-save > /etc/iptables.save
and then in rc.local (earlier would be better, but I'm lazy)
Code:
iptables-restore < /etc/iptables.save
-
Thanks to powdarrmonkey from:
RabbieBurns (4th August 2009)
-
4th August 2009, 12:21 PM #4 shorewall really is iptables made easy
Shoreline Firewall
-
Thanks to CyberNerd from:
RabbieBurns (4th August 2009)
-
4th August 2009, 01:31 PM #5 
Originally Posted by
kmount
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...
-
-
4th August 2009, 01:40 PM #6 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.
Code:
/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 to kmount from:
RabbieBurns (4th August 2009)
-
4th August 2009, 02:18 PM #7 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 to powdarrmonkey from:
RabbieBurns (4th August 2009)
-
4th August 2009, 03:11 PM #8 thanks very much for your help... I think I must owe you both a crate of beer for all the continued help
-
-
4th August 2009, 03:11 PM #9 Sounds like a plan
-
-
4th August 2009, 03:18 PM #10 I'm a tennants man; remember that when you're next home
-
SHARE:
Similar Threads
-
By localzuk in forum *nix
Replies: 17
Last Post: 3rd June 2009, 10:18 PM
-
Replies: 4
Last Post: 28th April 2009, 07:07 PM
-
Replies: 2
Last Post: 17th September 2008, 02:56 PM
-
Replies: 1
Last Post: 23rd December 2007, 11:19 PM
-
Replies: 23
Last Post: 9th November 2005, 02:54 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules