_______________________________________________________________________________________________________________________________________________________________________________________________________________________
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1
_______________________________________________________________________________________________________________________________________________________________________________________________________________________
nano /sh/iptables
_______________________________________________________________________________________________________________________________________________________________________________________________________________________
# Generated by iptables-save v1.4.21 on Sat Dec 31 21:34:00 2016
*filter
:INPUT DROP [169:18975]
:FORWARD ACCEPT [57:2856]
:OUTPUT ACCEPT [6:384]
-A INPUT -i lo -j ACCEPT
-A INPUT -i wlan0 -j ACCEPT
-A INPUT -i eth0 -j ACCEPT
-A FORWARD -i wlan0 -o eth0 -j ACCEPT
-A FORWARD -i eth0 -o wlan0 -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -o wlan0 -j ACCEPT
-A OUTPUT -o eth0 -j ACCEPT
COMMIT
# Completed on Sat Dec 31 21:34:00 2016
# Generated by iptables-save v1.4.21 on Sat Dec 31 21:34:00 2016
*nat
:PREROUTING ACCEPT [1320:90049]
:INPUT ACCEPT [1028:66442]
:OUTPUT ACCEPT [598:53121]
:POSTROUTING ACCEPT [22:2044]
-A POSTROUTING -d 192.168.0.0/24 -j SNAT --to-source 192.168.0.1
-A POSTROUTING -d 192.168.1.0/24 -j SNAT --to-source 192.168.1.1
COMMIT
# Completed on Sat Dec 31 21:34:00 2016
______________________________________________________________________________________________________________________________________________________________________________________________________________________
sudo iptables-restore < /sh/iptables
Комментариев нет:
Отправить комментарий