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

Re: Static Routes in Debian



On Fri, Feb 23, 2001 at 09:40:53AM -0800, Bill Wohler wrote:
>   While moving the eth0 configuration to /etc/network/interfaces is
>   obvious, less obvious is what should be done with the ipchains
>   commands and forwarding commands (echo "1" >
>   /proc/sys/net/ipv4/ip_forward)

look in /etc/network/options and set ip_forward=yes

> 
>   Would I copy the remnants of /etc/init.d/network.local to
>   /etc/network/firewall (or elsewhere?) and add "up
>   /etc/network/firewall" to interfaces, or would I add lots of "up"
>   commands for each individual ipchains command to the interfaces
>   file?

Make a separate /etc/network/firewall script and structure it like an init.d
script. Then, in your /etc/init.d/interfaces file, you can do stuff like:

auto eth0 <--- only require by later versions of ifupdown
iface eth0 inet static
  address a.b.c.d
  netmask e.f.g.h
  gateway i.j.k.l
  up /etc/network/firewall start
  down /etc/network/firewall stop

Or something similar of your own devising.

Luca

-- 
Luca Filipozzi
[dpkg] We are the apt. Resistance is futile. You will be packaged.



Reply to: