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 "5000000 5000000 5000000" > /proc
/sys
/net
/ipv
4/tcp_rmem
15 echo "5000000 5000000 5000000" > /proc
/sys
/net
/ipv
4/tcp_wmem
16 echo "5000000 5000000 5000000" > /proc
/sys
/net
/ipv
4/tcp_mem
17 echo "262143" > /proc
/sys
/net
/core
/rmem_max
18 echo "262143" > /proc
/sys
/net
/core
/wmem_max
19 echo "262143" > /proc
/sys
/net
/core
/rmem_default
20 echo "262143" > /proc
/sys
/net
/core
/wmem_default
21 echo "262143" > /proc
/sys
/net
/core
/optmem_max
22 echo "100000" > /proc
/sys
/net
/core
/netdev_max_backlog
24 echo "1" > /proc
/sys
/net
/ipv
4/ip_forward
26 echo "262144" > /proc
/sys
/net
/ipv
4/ip_conntrack_max
28 echo "waiting for netserver..."
29 /usr
/bin
/netcat
-c -l -p 8000
31 echo "setting up iptables..."
32 IPTABLES
=/sbin
/iptables
36 $IPTABLES -P INPUT ACCEPT
38 $IPTABLES -P OUTPUT ACCEPT
40 $IPTABLES -P FORWARD DROP
44 $IPTABLES -A FORWARD
-i $EXTIF -o $INTIF -m state
--state ESTABLISHED
,RELATED
-j ACCEPT
45 $IPTABLES -A FORWARD
-i $INTIF -o $EXTIF -j ACCEPT
46 $IPTABLES -A FORWARD
-j LOG
48 $IPTABLES -t nat
-A POSTROUTING
-o $EXTIF -j MASQUERADE
50 echo "informing client..."
51 echo "server ready" |
/usr
/bin
/netcat
-c $CLIENT 8000
53 echo "starting bash..."