Changes between Version 3 and Version 4 of Iptables
- Timestamp:
- 01/23/25 03:25:06 (4 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Iptables
v3 v4 37 37 }}} 38 38 For unblock just change -A to -D on the above command 39 40 41 == IP table src NAT 42 Ref [https://gist.github.com/tomasinouk/eec152019311b09905cd here] 43 44 All packets leaving eth1 will change source IP to 192.168.20.1 45 {{{ 46 iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 192.168.20.1 47 }}} 48 49 We save iptable as persistent rule when reboot 50 {{{ 51 ~]# apt install iptables-persistent 52 ~]# iptables-save > /etc/iptables/rules.v4 53 OR 54 ~]# ip6tables-save > /etc/iptables/rules.v6 55 ~]# iptable -L -t nat 56 }}}