Re: Debian netbase 3.17-1 init.d scripts
On Tue, Feb 22, 2000 at 02:10:01PM -0500 , Jeff Sheinberg wrote:
> Hi,
>
> Here is my current init.d/network file,
>
> #! /bin/sh
>
> # Masquerading requires that `forwarding' be enabled.
> echo "1" >/proc/sys/net/ipv4/ip_forward
/etc/network/config
>
> # Masquerading highly recommends that `always defrag' be enabled.
> echo "1" >/proc/sys/net/ipv4/ip_always_defrag
I don't concider this a "default" setting. or even a common one. So write
the needed function, file a wishlist bug
> # Log packets with impossible addresses to kernel log.
> echo "1" >/proc/sys/net/ipv4/conf/all/log_martians
> echo "1" >/proc/sys/net/ipv4/conf/default/log_martians
This is even more "advanced" configuration for an admin, who really cares.
> # Masquerade `eth0'.
> ipchains -P forward DENY
> ipchains -A forward -s 192.168.1.0/24 -j MASQ
>
ipmasq
> # Configure `lo' on `localnet'.
> ifconfig lo 127.0.0.1
interfaces - iface lo inet loopback
> # Configure `eth0' on `homenet'.
> ifconfig eth0 192.168.1.22 up
(note thta this command is incorrect - no netmask, broadcast)
iface eth0 inet static
address 192.168.1.22
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
> # Configure `dummy0' on `dummynet'.
> ifconfig dummy0 172.16.0.1 up
iface dummy0 inet static
address 192.168.1.22
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
> # /etc/init.d/network - end of file.
this even brings up routing. You can add "up route add default gw 192.168.0.1"
> so, how does your new scheme cleanly handle, in my case,
> everything that I need to do to setup masquerading properly?
>
> I would need to add a function to init.d/networking, and config
> options to network/options. So, changing 2 things in 2 different
> places - not my idea of `configuration' at all - especially when
> right now I have some simple commands in just one place.
Nothing hinders you from using what you want. Remove the startup link to
networking or completly rewrite networking if you want to.
> Make that 3 places - I now need to muck with network/interfaces
> also! And I just tried dpkg-reconfigure netbase - how come I
> didn't get asked any questions about my interfaces?
BEcause it's not doing it ATM? In slink you couldn't even reconfigure thinks
debconf lets you do now.
> And what is ifup (a c program) all about? Don't we already have
> ifconfig, the canonical (c) program to configure interfaces?
No, `ip' is tha cannonical program to "configure interfaces".
Use the source, Luke - ifup parses /etc/network/interfacs and then calls
apropriate command
> Also, pon does not configure interfaces, is just calls pppd which
> does any necessary interface configuration.
Just show me, how do you configure ppp0 with ifconfig.
> And to throw this stuff into frozen potato without any
> documentation that at least describes what problem you are trying
> to solve and how you have solved it.
see debian-devel archives. There were loong discussions about this.
And no, this change happend long before frozen.
> I appreciate it that you seem to be trying to come up with a
> better way, but it seems to me that you have lost direction - let
> me be generous and say that beta level code for something as
> fundamental as basic networking configuration does not belong in
> frozen.
So fix it or come with a better one. I like the new setup much better.
Dynamic configuration of devices using bootp/dhcp is much simpler.
Petr Cech
--
Debian GNU/Linux maintainer - www.debian.{org,cz}
cech@atrey.karlin.mff.cuni.cz
Reply to: