[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: newbee -- route (in file ?) ipchains ( in file ?)



On Tue, Jan 02, 2001 at 06:41:27PM +0100, M.B.Midden wrote:
> * where should i put rules like these to load them when i Boot or
> should i wright a script ( <--scripting howto ??)  ? ;
> 
> /sbin/ifconfig eth0 <isp_ip_here> netmask 255.255.255.0
> /sbin/ifconfig eth1 10.10.10.1 netmask 255.255.255.0
> 
> /sbin/route add default gw <isp_gw_here>  netmask 0.0.0.0 metric 1

Look at /etc/network/interfaces.

man interfaces for its definition.
man {ifup,ifdown} for a further reading about the Debian Way of
Networking.

> * Should i add also these or is that automatically generated ?

Default routes to the networks of all the interfaces are generally added
automatically.

> ----

> * and where should i put these?
> 
[snipped ipchain rules]

Create a script and place it somewhere like /root/scripts/ipchains.sh.

Now, make sure this is run whenever you want.
If you want this started at boot time, either use a CRON entry (check
out "@reboot").

Or you could create an init script controlling that script. If you want
that, copy /etc/init.d/skeleton as a template and check out update-rc.d
for creating the necessary links for the SysV-init (/etc/init.d/README).

Best of luck
Sven
-- 
Have you rebooted your NT box today?



Reply to: