ASUSWRT-Merlin RT-AC88U 380.68-0 Fri Aug 18 21:41:25 UTC 2017
vexira@RT-AC88U-7CC0:/tmp/home/root# iptables -t nat -D POSTROUTING ! -s $(nvram get wan0_ipaddr) -o $(nvram get wan0_ifname) -j MASQUERADE
vexira@RT-AC88U-7CC0:/tmp/home/root# iptables -t nat -I POSTROUTING -o $(nvram get wan0_ifname) -j SNAT --to-source $(nvram get wan0_ipaddr)
vexira@RT-AC88U-7CC0:/tmp/home/root# iptables-save
# Generated by iptables-save v1.4.14 on Thu Aug 24 17:10:29 2017
*raw
REROUTING ACCEPT [78142:12878420]
:OUTPUT ACCEPT [6791:6216349]
COMMIT
# Completed on Thu Aug 24 17:10:29 2017
# Generated by iptables-save v1.4.14 on Thu Aug 24 17:10:29 2017
*nat
REROUTING ACCEPT [3:248]
:INPUT ACCEPT [3:169]
:OUTPUT ACCEPT [1:65]
OSTROUTING ACCEPT [0:0]
NSFILTER - [0:0]
:LOCALSRV - [0:0]
CREDIRECT - [0:0]
UPNP - [0:0]
:VSERVER - [0:0]
:VUPNP - [0:0]
-A PREROUTING -d 1.43.254.50/32 -j VSERVER
-A PREROUTING -s 192.168.1.0/24 -p udp -m udp --dport 53 -j DNSFILTER
-A PREROUTING -s 192.168.1.0/24 -p tcp -m tcp --dport 53 -j DNSFILTER
-A POSTROUTING -o eth0 -j SNAT --to-source 1.43.254.50
-A POSTROUTING -o eth0 -j PUPNP
-A POSTROUTING -s 192.168.1.0/24 -d 192.168.1.0/24 -o br0 -j MASQUERADE
-A DNSFILTER -m mac --mac-source 00:0B:82:9E:1A:A8 -j RETURN
-A DNSFILTER -m mac --mac-source B8:27:EB:FC:EF:30 -j RETURN
-A DNSFILTER -j DNAT --to-destination 192.168.1.1
-A VSERVER -j VUPNP
-A VUPNP -p udp -m udp --dport 3074 -j DNAT --to-destination 192.168.1.58:3074
-A VUPNP -p udp -m udp --dport 59923 -j DNAT --to-destination 192.168.1.58:59923
-A VUPNP -p tcp -m tcp --dport 59923 -j DNAT --to-destination 192.168.1.58:59923
-A VUPNP -p udp -m udp --dport 22345 -j DNAT --to-destination 192.168.1.43:22345
-A VUPNP -p tcp -m tcp --dport 22345 -j DNAT --to-destination 192.168.1.43:22345
COMMIT
# Completed on Thu Aug 24 17:10:29 2017
# Generated by iptables-save v1.4.14 on Thu Aug 24 17:10:29 2017
*mangle
REROUTING ACCEPT [76782:12631181]
:INPUT ACCEPT [8628:1426406]
:FORWARD ACCEPT [68120:11203307]
:OUTPUT ACCEPT [6448:6133758]
OSTROUTING ACCEPT [74735:17394876]
:BWDPI_FILTER - [0:0]
-A PREROUTING -i eth0 -p udp -j BWDPI_FILTER
-A FORWARD -s 192.168.1.0/24 -d 192.168.1.0/24 -o br0 -j MARK --set-xmark 0x1/0x7
-A BWDPI_FILTER -i eth0 -p udp -m udp --sport 68 --dport 67 -j DROP
-A BWDPI_FILTER -i eth0 -p udp -m udp --sport 67 --dport 68 -j DROP
COMMIT
# Completed on Thu Aug 24 17:10:29 2017
# Generated by iptables-save v1.4.14 on Thu Aug 24 17:10:29 2017
*filter
:INPUT ACCEPT [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [2928:1683603]
:ACCESS_RESTRICTION - [0:0]
:FUPNP - [0:0]
:INPUT_ICMP - [0:0]
:NSFW - [0:0]
Controls - [0:0]
TCSRVLAN - [0:0]
TCSRVWAN - [0:0]
:SECURITY - [0:0]
:logaccept - [0:0]
:logdrop - [0:0]
-A INPUT -i eth0 -p icmp -m icmp --icmp-type 8 -j DROP
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -m state --state INVALID -j DROP
-A INPUT ! -i br0 -j PTCSRVWAN
-A INPUT -i br0 -j PTCSRVLAN
-A INPUT -i br0 -m state --state NEW -j ACCEPT
-A INPUT -i lo -m state --state NEW -j ACCEPT
-A INPUT -p udp -m udp --sport 67 --dport 68 -j ACCEPT
-A INPUT -p icmp -j INPUT_ICMP
-A INPUT -j DROP
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD ! -i br0 -o eth0 -j DROP
-A FORWARD -i eth0 -m state --state INVALID -j DROP
-A FORWARD -i br0 -o br0 -j ACCEPT
-A FORWARD -j NSFW
-A FORWARD -m conntrack --ctstate DNAT -j ACCEPT
-A FORWARD -i br0 -j ACCEPT
-A FUPNP -d 192.168.1.58/32 -p udp -m udp --dport 3074 -j ACCEPT
-A FUPNP -d 192.168.1.58/32 -p udp -m udp --dport 59923 -j ACCEPT
-A FUPNP -d 192.168.1.58/32 -p tcp -m tcp --dport 59923 -j ACCEPT
-A FUPNP -d 192.168.1.43/32 -p udp -m udp --dport 22345 -j ACCEPT
-A FUPNP -d 192.168.1.43/32 -p tcp -m tcp --dport 22345 -j ACCEPT
-A INPUT_ICMP -p icmp -m icmp --icmp-type 8 -j RETURN
-A INPUT_ICMP -p icmp -m icmp --icmp-type 13 -j RETURN
-A INPUT_ICMP -p icmp -j ACCEPT
-A PControls -j ACCEPT
-A SECURITY -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m limit --limit 1/sec -j RETURN
-A SECURITY -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j DROP
-A SECURITY -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK RST -m limit --limit 1/sec -j RETURN
-A SECURITY -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK RST -j DROP
-A SECURITY -p icmp -m icmp --icmp-type 8 -m limit --limit 1/sec -j RETURN
-A SECURITY -p icmp -m icmp --icmp-type 8 -j DROP
-A SECURITY -j RETURN
-A logaccept -m state --state NEW -j LOG --log-prefix "ACCEPT " --log-tcp-sequence --log-tcp-options --log-ip-options
-A logaccept -j ACCEPT
-A logdrop -m state --state NEW -j LOG --log-prefix "DROP " --log-tcp-sequence --log-tcp-options --log-ip-options
-A logdrop -j DROP
COMMIT
# Completed on Thu Aug 24 17:10:29 2017
vexira@RT-AC88U-7CC0:/tmp/home/root#
Full cone nat