add fish forwarder

This commit is contained in:
Neale Pickett 2011-07-29 20:19:13 -06:00
parent b2cdbfadbe
commit 2203c30ba6
2 changed files with 7 additions and 4 deletions

View File

@ -0,0 +1,3 @@
#! /bin/sh
exec socat -u udp-listen:27844 udp-datagram:172.16.24.255:27844,broadcast

View File

@ -27,22 +27,22 @@ echo 4096 > /proc/sys/net/ipv4/neigh/default/gc_thresh2
# No label: dnsmasq can't cope
ip addr add 172.16.0.1/24 dev eth0
ip addr add 172.30.73.1/24 dev eth0
ip link set eth0 up
for i in $(seq 24); do
ip link add link eth0 name eth0.$i type vlan id $i
ip addr add 172.16.$i.0/24 dev eth0.$i
ip addr add 172.16.$i.1/24 dev eth0.$i
ip link set eth0.$i up
done
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -A INPUT -p udp --dport 53 -j ACCEPT
iptables -A INPUT -p udp --dport 67:68 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
iptables -A INPUT -s 172.16.0.0/16 -j ACCEPT
iptables -A INPUT -j REJECT
iptables -A INPUT -s 172.16.0.0/12 -j ACCEPT
iptables -P INPUT DROP
sleep 8100d