mirror of https://github.com/dirtbags/moth.git
add fish forwarder
This commit is contained in:
parent
b2cdbfadbe
commit
2203c30ba6
|
@ -0,0 +1,3 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
exec socat -u udp-listen:27844 udp-datagram:172.16.24.255:27844,broadcast
|
|
@ -27,22 +27,22 @@ echo 4096 > /proc/sys/net/ipv4/neigh/default/gc_thresh2
|
||||||
|
|
||||||
# No label: dnsmasq can't cope
|
# No label: dnsmasq can't cope
|
||||||
ip addr add 172.16.0.1/24 dev eth0
|
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
|
ip link set eth0 up
|
||||||
|
|
||||||
for i in $(seq 24); do
|
for i in $(seq 24); do
|
||||||
ip link add link eth0 name eth0.$i type vlan id $i
|
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
|
ip link set eth0.$i up
|
||||||
done
|
done
|
||||||
|
|
||||||
iptables -P INPUT ACCEPT
|
|
||||||
iptables -P OUTPUT ACCEPT
|
iptables -P OUTPUT ACCEPT
|
||||||
iptables -P FORWARD ACCEPT
|
iptables -P FORWARD ACCEPT
|
||||||
|
|
||||||
iptables -A INPUT -p udp --dport 53 -j ACCEPT
|
iptables -A INPUT -p udp --dport 53 -j ACCEPT
|
||||||
iptables -A INPUT -p udp --dport 67:68 -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 -p icmp --icmp-type echo-request -j ACCEPT
|
||||||
iptables -A INPUT -s 172.16.0.0/16 -j ACCEPT
|
iptables -A INPUT -s 172.16.0.0/12 -j ACCEPT
|
||||||
iptables -A INPUT -j REJECT
|
iptables -P INPUT DROP
|
||||||
|
|
||||||
sleep 8100d
|
sleep 8100d
|
||||||
|
|
Loading…
Reference in New Issue