Raspbian: NAT hostap ke eth0

From OnnoWiki
Revision as of 07:52, 29 January 2019 by Onnowpurbo (talk | contribs) (Created page with "Mengaktifkan NAT (masquerade) ke eth0 Edit /etc/sysctl.conf net.ipv4.ip_forward=1 Masquerade sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE sudo sh -c "ipta...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Mengaktifkan NAT (masquerade) ke eth0

Edit /etc/sysctl.conf

net.ipv4.ip_forward=1

Masquerade

sudo iptables -t nat -A  POSTROUTING -o eth0 -j MASQUERADE
sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"

Edit /etc/rc.local sebelum "exit 0" tambahkan

iptables-restore < /etc/iptables.ipv4.nat

Reboot

reboot


Pranala Menarik