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 "5000000 5000000 5000000" > /proc
/sys
/net
/ipv
4/tcp_rmem
14 echo "5000000 5000000 5000000" > /proc
/sys
/net
/ipv
4/tcp_wmem
15 echo "5000000 5000000 5000000" > /proc
/sys
/net
/ipv
4/tcp_mem
16 echo "262143" > /proc
/sys
/net
/core
/rmem_max
17 echo "262143" > /proc
/sys
/net
/core
/wmem_max
18 echo "262143" > /proc
/sys
/net
/core
/rmem_default
19 echo "262143" > /proc
/sys
/net
/core
/wmem_default
20 echo "262143" > /proc
/sys
/net
/core
/optmem_max
21 echo "100000" > /proc
/sys
/net
/core
/netdev_max_backlog
23 echo "1" > /proc
/sys
/net
/ipv
4/ip_forward
25 echo "waiting for netserver..."
26 /usr
/bin
/netcat
-c -l -p 8000
28 echo "setting up iptables..."
29 IPTABLES
=/sbin
/iptables
33 $IPTABLES -P INPUT ACCEPT
35 $IPTABLES -P OUTPUT ACCEPT
37 $IPTABLES -P FORWARD DROP
41 $IPTABLES -A FORWARD
-i $EXTIF -o $INTIF -m state
--state ESTABLISHED
,RELATED
-j ACCEPT
42 $IPTABLES -A FORWARD
-i $INTIF -o $EXTIF -j ACCEPT
43 $IPTABLES -A FORWARD
-j LOG
45 $IPTABLES -t nat
-A POSTROUTING
-o $EXTIF -j MASQUERADE
47 echo "informing client..."
48 echo "server ready" |
/usr
/bin
/netcat
-c $CLIENT 8000
50 echo "starting bash..."