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 "waiting for netserver..."
27 /usr
/bin
/netcat
-c -l -p 8000
29 echo "setting up iptables..."
30 IPTABLES
=/sbin
/iptables
34 $IPTABLES -P INPUT ACCEPT
36 $IPTABLES -P OUTPUT ACCEPT
38 $IPTABLES -P FORWARD DROP
42 $IPTABLES -A FORWARD
-i $EXTIF -o $INTIF -m state
--state ESTABLISHED
,RELATED
-j ACCEPT
43 $IPTABLES -A FORWARD
-i $INTIF -o $EXTIF -j ACCEPT
44 $IPTABLES -A FORWARD
-j LOG
46 $IPTABLES -t nat
-A POSTROUTING
-o $EXTIF -j MASQUERADE
48 echo "informing client..."
49 echo "server ready" |
/usr
/bin
/netcat
-c $CLIENT 8000
51 echo "starting bash..."