morchel
Group: Members
Posts: 6
Joined: Feb. 2004 |
|
Posted: Oct. 23 2004,16:18 |
|
I finally had some time to get it working with dsl 0.8.1.1.
I wrote a script which configures ip-forwarding using iptables and sets the routing for my intranet. I put that script in /usr/sbin and added the name to my filetool.lst:
#!/bin/sh # second (internal) network-device ifconfig eth1 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 up > /dev/null
# set routing for internal network route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1 eth1 > /dev/nu l
# firewall ruleset /etc/rc.d/rc.firewall-2.4
# change hostname hostname gate > /dev/null
I made myself an iso with iptables in the root directory so when dsl starts up its already included. Thanks a lot to gui for providing the iptables.dsl.
I made a /etc/rc.d directory and put in the firewall-script (rc.firewall-2.4) which I got from the Linux IP Masquerade HOWTO. http://en.tldp.org/HOWTO/IP-Masquerade-HOWTO/firewall-examples.html. I just had to change the location of iptables and adapt the net-settings to my personal ones. It's just a test-script but at the moment it works perfectly for me.
Is /etc/rc.d a proper directory for that kind of scripts?
Ideas, thoughts, improvements, criticism, any reaction is welcome
Regards Morchel
|