|
@ -165,23 +165,20 @@ write_files:
 |
|
|
<entry key="Auto-generate config" type="Boolean">false</entry> |
|
|
<entry key="Auto-generate config" type="Boolean">false</entry> |
|
|
<entry key="config" type="String"> ifconfig eth1 up 192.168.101.1 netmask 255.255.255.252
 |
|
|
<entry key="config" type="String"> ifconfig eth1 up 192.168.101.1 netmask 255.255.255.252
 |
|
|
ifconfig eth2 up 192.168.102.1 netmask 255.255.255.252
 |
|
|
ifconfig eth2 up 192.168.102.1 netmask 255.255.255.252
 |
|
|

 |
|
|
|
|
|

 |
|
|

 |
|
|
dhclient eth0
 |
|
|
dhclient eth0
 |
|
|
dhclient eth3
 |
|
|
dhclient eth3
 |
|
|

 |
|
|
|
|
|

 |
|
|

 |
|
|
route add default gw 172.16.1.254 eth3
 |
|
|
route add default gw 172.16.1.254 eth3
 |
|
|
route add -net 192.168.101.0/30 gw 192.168.101.2 dev eth1
 |
|
|
route add -net 192.168.101.0/30 gw 192.168.101.2 dev eth1
 |
|
|
route add -net 192.168.1.0/24 gw 192.168.101.2 dev eth1
 |
|
|
route add -net 192.168.1.0/24 gw 192.168.101.2 dev eth1
 |
|
|
route add -net 192.168.102.0/30 gw 192.168.102.2 dev eth2
 |
|
|
route add -net 192.168.102.0/30 gw 192.168.102.2 dev eth2
 |
|
|
route add -net 192.168.2.0/24 gw 192.168.102.2 dev eth2
 |
|
|
route add -net 192.168.2.0/24 gw 192.168.102.2 dev eth2
 |
|
|

 |
|
|
|
|
|

 |
|
|

 |
|
|
iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE
 |
|
|
iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE
 |
|
|
iptables -A FORWARD -i eth2 -j ACCEPT
 |
|
|
iptables -A FORWARD -i eth2 -j ACCEPT
 |
|
|
iptables -A FORWARD -i eth1 -j ACCEPT
 |
|
|
iptables -A FORWARD -i eth1 -j ACCEPT
 |
|
|
/sbin/tc qdisc add dev eth3 root handle 1:1 netem delay 100ms
 |
|
|
|
|
|
|
|
|
/sbin/tc qdisc add dev eth2 root handle 1:1 netem delay 100ms loss 5%
 |
|
|
service ssh start
 |
|
|
service ssh start
 |
|
|

 |
|
|

 |
|
|
hostname ISP
 |
|
|
hostname ISP
 |
|
|