#! /bin/sh # Slackware 8.0 script - Partly by no@nod.se # # Known bug: Modules not unloaded when STOP # # Nätförklaringar: # 2001:6f0:4::/48 - Nät routat hit # 2001:6f0:4::/64 - Nät hemma på eth1 interfacet # 2001:6f0:4:1::/64 - Subnet i Vasteras # 2001:6f0:4:ffff::/64 - Länknät mellan Vasteras och min brandvägg # 2001:6f0:6:2::/64 - Länknät mellan ipv6rtr.t4.sto och min brandvägg case "$1" in start) # load modules modprobe ipv6 modprobe ip6_tables modprobe ip6t_LOG modprobe ip6table_filter # enable forwarding echo 1 > /proc/sys/net/ipv6/conf/all/forwarding # get IPv6-over-IPv4 tunnels up (enables automatic tunneling to 0::0/96) ifconfig sit0 up # every ifconfig sit0 tunnel 0:: # creates a new sit interface. they're named sequentially (sit1, # sit2, sit3 and so on) # setup a tunnel to AH iptunnel add sit1 mode sit remote 195.54.156.81 local 213.100.20.52 ttl 255 ifconfig sit1 up ifconfig sit1 add 2001:6f0:6:2:240:5ff:fe2c:f116/64 # configure the local interface (00:40:05:2C:F1:16) ifconfig eth1 add 2001:6f0:4:0:240:5ff:fe2c:f116/64 # Fix up the default routing route -A inet6 add 2000::/3 gw 2001:6f0:6:2:1:96e2:65a0:f dev sit1 # Tunnel to Vasteras iptunnel add sit2 mode sit remote 213.67.6.30 local 213.100.20.52 ttl 255 ifconfig sit2 up ifconfig sit2 add 2001:6f0:4:ffff:240:5ff:fe2c:f116/64 route -A inet6 add 2001:6f0:4:1::/64 gw 2001:6f0:4:ffff:a00:2bff:feba:c264 dev sit2 # start router advertisement daemon /usr/local/sbin/radvd ;; stop) killall radvd ifconfig sit1 down ifconfig sit0 down # rmmod ip6table_filter # rmmod ip6t_LOG # rmmod ip6_tables # rmmod ipv6 ;; *) echo "Usage: /etc/rc.d/rc.inet6 {start|stop}" exit 1 esac exit 0