Raspbian: NAT hostap ke eth0

From OnnoWiki
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