You are not logged in.
It's a while since I needed to edit iptables, but I can't seem to add new rules. The systemd iptables service is enabled and when I add a new rule and reload the unit, the new rule isn't added.
[root@vpn iptables]# iptables -nvL
Chain INPUT (policy ACCEPT 962 packets, 86707 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 834 packets, 126K bytes)
pkts bytes target prot opt in out source destination
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
systemctl reload iptables
[root@vpn iptables]# iptables -nvL
Chain INPUT (policy ACCEPT 1047 packets, 93980 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 916 packets, 142K bytes)
pkts bytes target prot opt in out source destination
Last edited by geekinthesticks (2017-04-07 17:01:14)
Offline
Thanks! It does tell me in the man page, but I seem to remember that straightforward -nvL listed nat rules as well. My memory is obviously in need of a refresh.
Offline
Why use a cut-down view? Just use the standard:
iptables-save
Offline