3 lines for linux nat: Difference between revisions
From Federal Burro of Information
Jump to navigationJump to search
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
/sbin/iptables -t nat -A POSTROUTING -s 10.21.1.6 -j SNAT --to-source 172.17.72.6 | /sbin/iptables -t nat -A POSTROUTING -s 10.21.1.6 -j SNAT --to-source 172.17.72.6 | ||
/sbin/iptables -t nat -A FORWARD -s 172.17.72.2 -j ACCEPT | /sbin/iptables -t nat -A FORWARD -s 172.17.72.2 -j ACCEPT | ||
[[Category:Script]] |
Latest revision as of 05:47, 6 April 2021
iptables nat table:
/sbin/iptables -t nat -A PREROUTING -d 172.17.72.6 -j DNAT --to-destination 10.21.1.6 /sbin/iptables -t nat -A POSTROUTING -s 10.21.1.6 -j SNAT --to-source 172.17.72.6 /sbin/iptables -t nat -A FORWARD -s 172.17.72.2 -j ACCEPT