[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