

###########  HOTSPOT  ###########   

sysctl -w net.ipv4.ip_forward=1


insmod /home/e6542/Documents/DummyNet/ipfw3-2012/kipfw-mod/ipfw_mod.ko


hostapd /etc/hostapd-1.0/hostapd/hostapd.conf &

###########  ROUTING  ########### 

iptables -t nat -A PREROUTING -p UDP -s 10.0.1.6 -d 10.0.2.6 -i wlan1 -j DNAT --to 141.11.0.165:7650
iptables -t nat -A PREROUTING -p UDP -s 10.0.2.6 -d 10.0.1.6 -i wlan1 -j DNAT --to 141.11.0.165:7651
iptables -t nat -A PREROUTING -p UDP --dport 8650 -i eth0 -j DNAT --to 10.0.2.6:5545
iptables -t nat -A PREROUTING -p UDP --dport 8651 -i eth0 -j DNAT --to 10.0.1.6:14180


iptables -t nat -A POSTROUTING -p UDP --dport 14180 -j SNAT --to 10.0.2.6:5545
iptables -t nat -A POSTROUTING -p UDP --dport 5545 -j SNAT --to 10.0.1.6:14180


###########  Delete routing entries to enter another node for planetlab  ########### 

iptables -t nat -D PREROUTING 1
iptables -t nat -D PREROUTING 1
iptables -t nat -D PREROUTING 1
iptables -t nat -D PREROUTING 1






