NAT MASQUARADE

From OnnoWiki
Revision as of 17:39, 3 March 2017 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Untuk melakukan masquarade kita menggunakan perintah berikut (dengan asumsi sambungan ke Internet melalui usb0)

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE


JIke LAN menuju ke Internet menggunakan WLAN wlp2s0


echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o wlp2s0 -j MASQUERADE


Jika LAN menuju ke Internet mengggunakan eth0

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


Pranala Menarik