6 echo "setting up network..."
8 ifconfig eth0
$EXTIF txqueuelen
1000
9 ifconfig eth1
$INTIF txqueuelen
1000
11 echo "0" > /proc
/sys
/net
/ipv
4/tcp_timestamps
12 echo "0" > /proc
/sys
/net
/ipv
4/tcp_sack
13 echo "1" > /proc
/sys
/net
/ipv
4/tcp_vegas_cong_avoid
14 echo "262144" > /proc
/sys
/net
/ipv
4/ip_conntrack_max
15 echo "5000000 5000000 5000000" > /proc
/sys
/net
/ipv
4/tcp_rmem
16 echo "5000000 5000000 5000000" > /proc
/sys
/net
/ipv
4/tcp_wmem
17 echo "5000000 5000000 5000000" > /proc
/sys
/net
/ipv
4/tcp_mem
18 echo "262143" > /proc
/sys
/net
/core
/rmem_max
19 echo "262143" > /proc
/sys
/net
/core
/wmem_max
20 echo "262143" > /proc
/sys
/net
/core
/rmem_default
21 echo "262143" > /proc
/sys
/net
/core
/wmem_default
22 echo "262143" > /proc
/sys
/net
/core
/optmem_max
23 echo "100000" > /proc
/sys
/net
/core
/netdev_max_backlog
25 echo "1" > /proc
/sys
/net
/ipv
4/ip_forward
27 echo "262144" > /proc
/sys
/net
/ipv
4/ip_conntrack_max
29 echo "waiting for netserver..."
32 echo "setting up iptables..."
33 IPTABLES
=/sbin
/iptables
37 $IPTABLES -P INPUT ACCEPT
39 $IPTABLES -P OUTPUT ACCEPT
41 $IPTABLES -P FORWARD DROP
45 $IPTABLES -A FORWARD
-i $EXTIF -o $INTIF -m state
--state ESTABLISHED
,RELATED
-j ACCEPT
46 $IPTABLES -A FORWARD
-i $INTIF -o $EXTIF -j ACCEPT
47 $IPTABLES -A FORWARD
-j LOG
49 $IPTABLES -t nat
-A POSTROUTING
-o $EXTIF -j MASQUERADE
51 echo "informing client..."
53 echo "server ready" | netcat
-c $CLIENT 8000
55 echo "starting bash..."