Author
Message
Alozaros DD-WRT Guru Joined: 16 Nov 2015 Posts: 6447 Location: UK, London, just across the river..
Posted: Sat Feb 22, 2020 13:12 Post subject:
Cartel...as i see you are not new in the forum...always when you ask something, tell us your router model/revision/ and current build running...
as i said on some routers multiport command is present or its range is very limited or its not present at all..
best hit...line per port....
unless you are not struggling with lack of nvram... _________________Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Back to top
Sponsor
Wildlion DD-WRT Guru Joined: 24 May 2016 Posts: 1416
Posted: Sat Feb 22, 2020 17:05 Post subject:
Yes those would work, as noted depending on your router version/firmware the "multiport" module may not be present, and you would have to enter each port on a different line, but you seem to get the syntax (a reference is: https://wiki.dd-wrt.com/wiki/index.php/Iptables_command )
Back to top
danielwritesback DD-WRT User Joined: 29 Aug 2011 Posts: 240
Posted: Wed Apr 01, 2020 20:53 Post subject:
Currently, I have: Code: iptables -t nat -I PREROUTING -p tcp -m multiport --sport 22,23,53,135,139,445,623,3389,5357,5900,9971,16992,16993,16994,16995 -j DROP
iptables -t nat -I PREROUTING -p udp -m multiport --sport 22,135,137,138,161,445,623,1900,3702,5355,9971,16992,16993,16994,16995 -j DROP
iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP
iptables -I OUTPUT -p tcp --dport 53 -j REJECT
iptables -I FORWARD -d 8.8.8.8 -j REJECT
iptables -I FORWARD -d 8.8.4.4 -j REJECT
The last two lines are for preventing excessively high connection count from Google home and chromecast devices.
Back to top