Revision 0b807e3e

View differences:

tests/nat-test/lab.conf
1
LAB_DESCRIPTION="Messaging Layer test"
2
LAB_VERSION=0.1
3
LAB_AUTHOR="Csaba Kiraly"
4

  
5
peer0[0]="public"
6
nat1[0]="public"
7
nat1[1]="private1"
8
peer1a[0]="private1"
9
peer1b[0]="private1"
10

  
11
# Enable the following if you need a gateway towards the host machine or 
12
# the real Internet.
13
# You might need to copy your /etc/resolv.conf into dns/etc/resolv.conf
14
# To have real dns resolution
15
#dns[eth1]=tap,10.0.129.1,10.0.129.3
16
# To have routing towards the rela Internet
17
#probe[eth1]=tap,10.0.129.1,10.0.129.2
tests/nat-test/nat1.startup
1
#configure the network interfaces
2
ifconfig eth0 ${HOSTNAME}pub up
3
ifconfig eth1 ${HOSTNAME}priv up
4

  
5
# turn on NAT
6
echo 1 > /proc/sys/net/ipv4/ip_forward
7
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
tests/nat-test/nat1/README
1
a NAT device
tests/nat-test/peer.startup
1
#configure the network interfaces
2
ifconfig eth0 $HOSTNAME up
3
route add default gw nat1priv
tests/nat-test/peer0.startup
1
#configure the network interfaces
2
ifconfig eth0 $HOSTNAME up
tests/nat-test/peer0/README
1
a peer with public IP
tests/nat-test/peer1a.startup
1
#configure the network interfaces
2
ifconfig eth0 $HOSTNAME up
3
route add default gw nat1priv
tests/nat-test/peer1a/README
1
a peer behind a NAT
tests/nat-test/peer1b.startup
1
#configure the network interfaces
2
ifconfig eth0 $HOSTNAME up
3
route add default gw nat1priv
tests/nat-test/peer1b/README
1
a peer behind a NAT.
2
Another peer is behind the same NAT.
tests/nat-test/shared/etc/hosts
1
192.168.1.100	peer1a
2

  
3
192.168.1.101	peer1b
4

  
5
192.168.1.1	nat1priv
6
55.55.55.101	nat1pub
7

  
8
55.55.55.100	peer0

Also available in: Unified diff