Skip to main content

Network Masquerade

Network Masquerade

NetworkMasquerade

  • #! /bin/sh
    # IP Masquerading - iptables
    
    
    sudo route del default eth1
    
    sudo route add default eth0
    
    sudo iptables -t nat -A POSTROUTING -s 192.168.1.101 -d ! 192.168.1.101 -j MASQUERADE
    sudo iptables -t nat -A POSTROUTING -s 192.168.1.102 -d ! 192.168.1.102 -j MASQUERADE
    sudo iptables -t nat -A POSTROUTING -s 192.168.1.103 -d ! 192.168.1.103 -j MASQUERADE
    sudo iptables -t nat -A POSTROUTING -s 192.168.1.104 -d ! 192.168.1.104 -j MASQUERADE
    sudo iptables -t nat -A POSTROUTING -s 192.168.1.105 -d ! 192.168.1.105 -j MASQUERADE
    
    sudo iptables -t nat -L
    
    sudo mount -t smbfs -o username=2004710,password=2004710,workgroup=clt.net,iocharset=utf8,file_mode=0777,dir_mode=0777 //203.246.153.2/nis2010$ /home/hyunsu/Mountpoint/NIS2010
    sudo mount -t smbfs -o username=2004710,password=2004710,workgroup=clt.net,iocharset=utf8,file_mode=0777,dir_mode=0777 //203.246.153.2/nis2010dev$ /home/hyunsu/Mountpoint/NIS2010DEV