Re: iptables service with debian

2012-05-01 Thread Tom H
On Tue, May 1, 2012 at 4:29 AM, Chris Davies wrote: > Tom H wrote: >> >> It's best to run an iptables script from "/etc/network/if-pre-up.d/". > > Unless you're using NetworkManager, which after two years and offers of > patches from the community, still doesn't support pre-up or post-down. > > (

Re: iptables service with debian

2012-05-01 Thread Chris Davies
Tom H wrote: > It's best to run an iptables script from "/etc/network/if-pre-up.d/". Unless you're using NetworkManager, which after two years and offers of patches from the community, still doesn't support pre-up or post-down. (I've come across this recently with a situation where I want my mai

Re: iptables service with debian

2012-04-30 Thread Pascal Hambourg
Tom H a écrit : > > Googling through Debian lists, I see that you've disliked > "/etc/network/if-pre-up.d/" since its inception; and rightly so. I don't know what you've found, but you misunderstood : I do not dislike /etc/network/if-*.d/. > But disliking the use of "/etc/network/if-pre-up.d/" f

Re: iptables service with debian

2012-04-30 Thread Rob Owens
On Mon, Apr 30, 2012 at 04:47:30PM +0100, Jon Dowland wrote: > On Mon, Apr 30, 2012 at 11:25:47AM -0400, Rob Owens wrote: > > Well, it didn't take long to find the answer on the internet. Get your > > firewall set up and then: > > > > iptables-save > /etc/iptables/rules > > > > I tested it and i

Re: iptables service with debian

2012-04-30 Thread Tom H
On Mon, Apr 30, 2012 at 11:25 AM, Rob Owens wrote: > On Mon, Apr 30, 2012 at 11:14:36AM -0400, Rob Owens wrote: >> >> In the meantime, I'm trying out iptables-persistent.  I have it installed >> now, >> but there is no manpage and nothing useful in /usr/share/doc.  Time to >> do some research...

Re: iptables service with debian

2012-04-30 Thread Tom H
On Mon, Apr 30, 2012 at 11:14 AM, Rob Owens wrote: > I have tried to use /etc/network/if-pre-up.d on my laptop (which uses > NetworkManager) and it does not load my iptables rules.  But if I call > my script manually, it will load properly.  Is NetworkManager > incompatible with /etc/network/if-

Re: iptables service with debian

2012-04-30 Thread Tom H
On Mon, Apr 30, 2012 at 9:27 AM, Jon Dowland wrote: > On Mon, Apr 30, 2012 at 05:38:45AM -0400, Tom H wrote: >> >> …or using something more or less non-standard like the >> apf-firewall or arno-iptables-firewall packages (or any other iptables >> frontend; these are the two that I know of). > > uf

Re: iptables service with debian

2012-04-30 Thread Jon Dowland
On Mon, Apr 30, 2012 at 11:25:47AM -0400, Rob Owens wrote: > Well, it didn't take long to find the answer on the internet. Get your > firewall set up and then: > > iptables-save > /etc/iptables/rules > > I tested it and it works! What version of the package? It would appear the file should be r

Re: iptables service with debian

2012-04-30 Thread Jon Dowland
On Mon, Apr 30, 2012 at 11:14:36AM -0400, Rob Owens wrote: > I have tried to use /etc/network/if-pre-up.d on my laptop (which uses > NetworkManager) and it does not load my iptables rules. But if I call > my script manually, it will load properly. Is NetworkManager > incompatible with /etc/networ

Re: iptables service with debian

2012-04-30 Thread Rob Owens
On Mon, Apr 30, 2012 at 11:14:36AM -0400, Rob Owens wrote: > On Sat, Apr 28, 2012 at 01:15:52PM -0400, Tom H wrote: > > On Sat, Apr 28, 2012 at 4:30 AM, Pascal Hambourg > > wrote: > > > Hello, > > > Tom H a écrit : > > >> On Fri, Apr 27, 2012 at 6:59 PM, Pascal Hambourg > > >> wrote: > > >>> To

Re: iptables service with debian

2012-04-30 Thread Rob Owens
On Sat, Apr 28, 2012 at 01:15:52PM -0400, Tom H wrote: > On Sat, Apr 28, 2012 at 4:30 AM, Pascal Hambourg > wrote: > > Hello, > > Tom H a écrit : > >> On Fri, Apr 27, 2012 at 6:59 PM, Pascal Hambourg > >> wrote: > >>> Tom H a écrit : > It's best to run an iptables script from "/etc/network

Re: iptables service with debian

2012-04-30 Thread Jon Dowland
On Mon, Apr 30, 2012 at 05:38:45AM -0400, Tom H wrote: > …or using something more or less non-standard like the > apf-firewall or arno-iptables-firewall packages (or any other iptables > frontend; these are the two that I know of). ufw is another which is quite simple for basic firewall needs. -

Re: iptables service with debian

2012-04-30 Thread Tom H
On Sun, Apr 29, 2012 at 8:44 AM, Pascal Hambourg wrote: > Tom H a écrit : >> On Sat, Apr 28, 2012 at 4:30 AM, Pascal Hambourg >> wrote: >>> Iptables should be initialized from an initscript run before networking. >> >> I agree but until someone else pointed out that there was >> iptables-pers

Re: iptables service with debian

2012-04-30 Thread Tom H
On Sun, Apr 29, 2012 at 4:08 AM, Bonno Bloksma wrote: >> It's best to run an iptables script from "/etc/network/if-pre-up.d/". > Only for the rules which are related to a specific interface. > Ruleset initialization should not be done from there. Why not? >>> >>> Because it

Re: iptables service with debian

2012-04-29 Thread Pascal Hambourg
Tom H a écrit : > On Sat, Apr 28, 2012 at 4:30 AM, Pascal Hambourg > wrote: >> >> Iptables should be initialized from an initscript run before networking. > > I agree but until someone else pointed out that there was > iptables-persistent for that, there was no packaged way of doing so. Actuall

RE: iptables service with debian

2012-04-29 Thread Bonno Bloksma
Hi, > It's best to run an iptables script from "/etc/network/if-pre-up.d/". Only for the rules which are related to a specific interface. Ruleset initialization should not be done from there. >>> >>> Why not? >> >> Because it makes no sense to re-initialize the ruleset every time an

Re: iptables service with debian

2012-04-28 Thread Tom H
On Sat, Apr 28, 2012 at 4:30 AM, Pascal Hambourg wrote: > Hello, > Tom H a écrit : >> On Fri, Apr 27, 2012 at 6:59 PM, Pascal Hambourg >> wrote: >>> Tom H a écrit : It's best to run an iptables script from "/etc/network/if-pre-up.d/". >>> Only for the rules which are related to a specific i

Re: iptables service with debian

2012-04-28 Thread Tom H
On Sat, Apr 28, 2012 at 3:40 AM, Joe wrote: > On Sat, 28 Apr 2012 02:41:29 -0400 > Tom H wrote: >> On Fri, Apr 27, 2012 at 6:59 PM, Pascal Hambourg >> wrote: >> > Tom H a écrit : >> >> On Fri, Apr 27, 2012 at 4:05 AM, Joe wrote: >> >>> >> >>> But the save and restore commands only give you the

Re: iptables service with debian

2012-04-28 Thread Andrei POPESCU
On Jo, 26 apr 12, 22:38:25, Joe wrote: > > The usual way to organise iptables rules is to have a script that runs > as part of the boot sequence, usually also checking for the correct > modules, starting IP forwarding, etc. It isn't a workaround to run it > from an rc, how else do you think things

Re: iptables service with debian

2012-04-28 Thread Pascal Hambourg
Hello, Tom H a écrit : > On Fri, Apr 27, 2012 at 6:59 PM, Pascal Hambourg > wrote: >> Tom H a écrit : >>> It's best to run an iptables script from "/etc/network/if-pre-up.d/". >> Only for the rules which are related to a specific interface. Ruleset >> initialization should not be done from there

Re: iptables service with debian

2012-04-28 Thread Joe
On Sat, 28 Apr 2012 02:41:29 -0400 Tom H wrote: > On Fri, Apr 27, 2012 at 6:59 PM, Pascal Hambourg > wrote: > > Tom H a écrit : > >> On Fri, Apr 27, 2012 at 4:05 AM, Joe wrote: > >>> > >>> But the save and restore commands only give you the iptables > >>> rules, and you may want to do other net

Re: iptables service with debian

2012-04-27 Thread Tom H
On Fri, Apr 27, 2012 at 6:59 PM, Pascal Hambourg wrote: > Tom H a écrit : >> On Fri, Apr 27, 2012 at 4:05 AM, Joe wrote: >>> >>> But the save and restore commands only give you the iptables rules, and >>> you may want to do other network-related things when the 'service' is >>> started, such as l

Re: iptables service with debian

2012-04-27 Thread Pascal Hambourg
Tom H a écrit : > On Fri, Apr 27, 2012 at 4:05 AM, Joe wrote: >> >> But the save and restore commands only give you the iptables rules, and >> you may want to do other network-related things when the 'service' is >> started, such as loading conntrack modules for unusual protocols. > > It's best t

Re: iptables service with debian

2012-04-27 Thread Pascal Hambourg
Hello, Muhammad Yousuf Khan a écrit : > i run this command > > iptables -t nat -A POSTROUTING -o eth1 -d 8.8.4.4 -j MASQUERADE > > my client computers able to ping 8.8.4.4 > > but when i "iptables --flush -t nat" it clrear the table but my > client can still ping the destination. Do you mean

Re: iptables service with debian

2012-04-27 Thread Tom H
On Fri, Apr 27, 2012 at 4:05 AM, Joe wrote: > On Fri, 27 Apr 2012 12:06:37 +0500 > Muhammad Yousuf Khan wrote: >> >> Thanks for the clearing my concept. >> however i read some of the part via google that there is a file >> /etc/network/iptables in Debian from where all the startup scripts run >>

Re: iptables service with debian

2012-04-27 Thread Joe
On Fri, 27 Apr 2012 12:06:37 +0500 Muhammad Yousuf Khan wrote: > Thanks for the clearing my concept. > however i read some of the part via google that there is a file > /etc/network/iptables in Debian from where all the startup scripts run > for FW . may be i didnt got the correct idea out of it.

Re: iptables service with debian

2012-04-27 Thread Muhammad Yousuf Khan
On Fri, Apr 27, 2012 at 2:38 AM, Joe wrote: > On Thu, 26 Apr 2012 14:13:28 +0500 > Muhammad Yousuf Khan wrote: > >> i run this command >> >> iptables -t nat -A POSTROUTING -o eth1 -d 8.8.4.4 -j MASQUERADE >> >> my client computers able to ping 8.8.4.4 >> >> but  when i "iptables --flush -t nat"  

Re: iptables service with debian

2012-04-26 Thread Joe
On Thu, 26 Apr 2012 14:13:28 +0500 Muhammad Yousuf Khan wrote: > i run this command > > iptables -t nat -A POSTROUTING -o eth1 -d 8.8.4.4 -j MASQUERADE > > my client computers able to ping 8.8.4.4 > > but when i "iptables --flush -t nat" it clrear the table but my > client can still ping the

iptables service with debian

2012-04-26 Thread Muhammad Yousuf Khan
i run this command iptables -t nat -A POSTROUTING -o eth1 -d 8.8.4.4 -j MASQUERADE my client computers able to ping 8.8.4.4 but when i "iptables --flush -t nat" it clrear the table but my client can still ping the destination. i check "iptables-save" is shows that tables are empty. i thought