On 2005-10-03, Niki Kovacs <mickey@mouse.com> wrote:
> Hi,
>
> I'm a long-time Slackware user currently giving Debian a try... and I like
> it! And it's well documented!
>
> One thing puzzles me. One of the big differences is handling of startup. Now
> I wonder where to put the stuff that I used to put in /etc/rc.d/rc.M,
> or /etc/rc.d/rc.local. Would that be /etc/init.d/bootmisc.sh?
>
> More concretely, here's the things I want to do:
>
> 1) On one machine I have two ethernet cards that used to be "linked" by a
> bridge with bridge-utils. The two cards were not defined in terms of IP
> (both 0.0.0.0), but the IP was assigned to the (virtual) interface br0.
> Question: where do I put the definition of that bridge? (used to be in
> rc.local)
That would be in /etc/network/interfaces - it has a very good man-page
that should help you get the bridge up and running.
> 2) my HP printer works with hpoj, via a daemon /usr/sbin/ptal-init. This
> daemon has to be launched on startup, but *before* CUPS. (On my Slack box,
> I used to add a stanza in /etc/rc.d/rc.M, right before the CUPS stanza).
> Question 2: where do I put the command to launch /usr/sbin/ptal-init?
Install the debian-package "hpoj" - it will take care of init-scripts in
/etc/init.d (and links in /etc/rc*.d
> 3) I'm on dialup here, and we share a connection via the linesrv connection
> manager. To activate IP masquerading, I had a two-liner
> in /etc/rc.d/rc.firewall, and IP forwarding was activated
> with /etc/rc.d/rc.ip_forward. Question 3: how are things done properly the
> Debian way for IP masquerading.
You could install systune and in /etc/systune.conf set
/proc/sys/net/ipv4/ip_forward:1
And, for the very simple masquerading solution - manually type in
whatever you had in your rc.firewall script, then do:
/etc/init.d/iptables save active
This will save the active iptables configuration and automatically
restore it after reboots.
Alternatively you can save it under a different name and do :
/etc/init.d/iptables restore <whatevernameyouchoose>
to manually set the masquerading.
A different way (and probably more sequre) would be to install one of
the many firewall packages from debian.
$ apt-cache search firewall
should give you a "few" startingpoints.
HTH,
--
Ole-Morten Duesund
http://glemt.net/