Fw: [SLUG] IPtables Script

2003-10-15 Thread Craig Mead
- Original Message - 
From: Robert Collins [EMAIL PROTECTED]
To: Craig Mead [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 3:11 PM
Subject: Re: [SLUG] IPtables Script


 2 - set a var. @ the top of the script so its just one change per down

or use ppp+ in the iptables script, which will match all ppp interfaces.
And doesn't need to be bounced on link failure/resumption.

Rob


Rob,

Perfect!

Thank you!

Cheers, Craig
On Wed, 2003-10-15 at 15:08, Craig Mead wrote:
 G'day,
 1 - force it to come up on ppp0

unit 0 in the ppp config.

 2 - set a var. @ the top of the script so its just one change per down

or use ppp+ in the iptables script, which will match all ppp interfaces.
And doesn't need to be bounced on link failure/resumption.

Rob
-- 
GPG key available at: http://members.aardvark.net.au/lifeless/keys.txt.


signature.asc
Description: Binary data
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] IPtables Script

2003-10-15 Thread Grant Parnell
On Wed, 15 Oct 2003, Robert Collins wrote:

 On Wed, 2003-10-15 at 15:08, Craig Mead wrote:
  G'day,
  1 - force it to come up on ppp0
 
 unit 0 in the ppp config.

Oh nice! BUT that's not in the current release of pppd (2.4.1) but is in 
the new beta version (2.4.2b3). 
Thanks for alerting me to the possibility though, it's made me read the 
release notes for the beta, which includes some good stuff. MS-CHAP-v2, 
MPPE, PPPOE for example.

 
  2 - set a var. @ the top of the script so its just one change per down
 
 or use ppp+ in the iptables script, which will match all ppp interfaces.
 And doesn't need to be bounced on link failure/resumption.

Didn't know that either! Pity half my customers have ethX/pppX 
combinations ethX being the ADSL router and ppp0 being the modem backup 
:-( Also depends on the ADSL modem being used.

-- 
---GRiP---
Electronic Hobyist, Former Arcadia BBS nut, Occasonal nudist, 
Linux Guru, SLUG/AUUG/Linux Australia member, Sydney Flashmobber,
BMX rider, Walker, Raver  rave music lover, Big kid that refuses
grow up. I'd make a good family pet, take me home today!
Do people actually read these things?

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


[SLUG] IPtables Script

2003-10-14 Thread Craig Mead
G'day,

Got an iptables script which shares the DSL out over the network. Thanks to
the joys of being on Telstra the connections been up and down quite
regularly lately.

Problem is the script is (well, was) based around ppp0

When the connection goes down it usually doesn't come back up as ppp0, it'll
be ppp1  ppp4 etc.

Currently just going thru the script and replacing any instances of pppX
with pppY each time it comes up on a diff. i/f

2 thoughts on how I could try and fix it

1 - force it to come up on ppp0
2 - set a var. @ the top of the script so its just one change per down

Problem!

I dunno how to do either.

Thoughts / comments / flames appreciated.

TIA.

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] IPtables Script

2003-10-14 Thread Robert Collins
On Wed, 2003-10-15 at 15:08, Craig Mead wrote:
 G'day,
 1 - force it to come up on ppp0

unit 0 in the ppp config.

 2 - set a var. @ the top of the script so its just one change per down

or use ppp+ in the iptables script, which will match all ppp interfaces.
And doesn't need to be bounced on link failure/resumption.

Rob
-- 
GPG key available at: http://members.aardvark.net.au/lifeless/keys.txt.


signature.asc
Description: This is a digitally signed message part
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] IPtables Script

2003-10-14 Thread scott
[EMAIL PROTECTED] wrote on 15-10-2003 03:08:16 PM:

 G'day,
 
 Got an iptables script which shares the DSL out over the network. Thanks 
to
 the joys of being on Telstra the connections been up and down quite
 regularly lately.
 
 Problem is the script is (well, was) based around ppp0
 
 When the connection goes down it usually doesn't come back up as ppp0, 
it'll
 be ppp1  ppp4 etc.
 
 Currently just going thru the script and replacing any instances of pppX
 with pppY each time it comes up on a diff. i/f
 
 2 thoughts on how I could try and fix it
 
 1 - force it to come up on ppp0
 2 - set a var. @ the top of the script so its just one change per down
 
 Problem!
 
You could use ip-up.
What flavor of Linux are you using? All I know is between Redhat and 
Debian they are different.
man pppd and search for ip-up for details. I think the pppX is file 
descriptor 1.

An example script would be for redhat in /etc/ppp/ip-up.local (providing 
you are only using ppp on your dsl, and nothing else):

/path/to/firewall.sh $1

And put in your firewall script: $ppp=$1

Don't forget to make the ip-up.local executable for the user that pppd 
launches as.

Cheers,

Scott
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug