Difference between revisions of "NAT MASQUARADE"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) (New page: Utk melakukan masquarade iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE ==Pranala Menarik== * NAT) |
Onnowpurbo (talk | contribs) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | 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 | iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE | ||
+ | |||
+ | Jika 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 | ||
+ | |||
+ | Jika LAN menuju ke Internet mengggunakan enp0s3 | ||
+ | |||
+ | echo 1 > /proc/sys/net/ipv4/ip_forward | ||
+ | iptables -t nat -A POSTROUTING -o enp0s3 -j MASQUERADE | ||
==Pranala Menarik== | ==Pranala Menarik== | ||
+ | * [[Script NAT Proxy]] | ||
* [[NAT]] | * [[NAT]] |
Latest revision as of 05:45, 31 March 2020
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
Jika 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
Jika LAN menuju ke Internet mengggunakan enp0s3
echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o enp0s3 -j MASQUERADE