Re: basic question: eth0 ppp0, which interface?
From: Martin Cooper (usenet_at_martinc.me.uk)
Date: 05/13/03
- Previous message: Christopher Browne: "Re: How can i do Client/Server Authentication on Linux"
- In reply to: H. S.: "Re: basic question: eth0 ppp0, which interface?"
- Next in thread: H. S.: "Re: basic question: eth0 ppp0, which interface?"
- Reply: H. S.: "Re: basic question: eth0 ppp0, which interface?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 13 May 2003 22:55:33 +0100
Hi,
"H. S." <g_reate_xcalibur@yahoo.com> wrote in message
news:nv_va.3261$mK2.299399@news20.bellglobal.com...
> Markku Kolkka wrote:
<snip>
> So, since I want to have my own iptables script, I guess it should
be
> started when ppp0 script gets called? Right?
Not really, no. You can setup your rules using '-i ppp+' instead of
any other method (that way you don't need to know your IP address for
the interface), then the rules will be in place before your modem gets
a connection to the internet. Usually, on distributions such as
redhat, you will have a file called /etc/init.d/iptables that contains
your rules, so when the box shuts down it will run the command :-
iptables-save > /etc/init.d/iptables
and on startup, it will run the command :-
iptables-restore < /etc/init.d/iptables
This will normally be run before starting any of your network
interfaces, so that you have protection as soon as the interfaces are
brought up. If setup this way, whatever you insert at runtime will be
saved, and the state of the firewall restored automatically on the
next boot. However, distributions come with various other firewall
scripts which may run at boot time as well, so this may not hold
trueif you have installed another firewall script.
>
> How do I do that? Usually, people place their iptables scripts in
rc.d
> directory (or was it network.d or something like this), from where
it
> gets called automatically during bootup.
To do that, run it from /etc/ppp/ip-up (At least that's what it is
called on my gentoo system's), but see above. Running the script here
could leave you open to an attack for a second or so before your
script completes.
Martin
- Previous message: Christopher Browne: "Re: How can i do Client/Server Authentication on Linux"
- In reply to: H. S.: "Re: basic question: eth0 ppp0, which interface?"
- Next in thread: H. S.: "Re: basic question: eth0 ppp0, which interface?"
- Reply: H. S.: "Re: basic question: eth0 ppp0, which interface?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|