
- use -A (append) instead of -I (insert) This makes shure the rule order is correct. This fixes #421. - use uci to determine the correct wan interface This is the reason, why #421 was only on wr1043. Now the firewall rule applies to all router. - remove old and not used rules Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
11 lines
410 B
Bash
Executable file
11 lines
410 B
Bash
Executable file
#!/bin/sh
|
||
|
||
#solves MTU problem with bad ISP´s
|
||
iptables -A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
|
||
|
||
# Wenn ein router direkt am Netz hängt, ist er auch ssh Angriffen ausgesetzt.
|
||
# Das wirkt bei kleinen Geräten wir ein DOS
|
||
WAN=$(uci get network.wan.ifname)
|
||
iptables -A INPUT -i $WAN -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
|
||
iptables -A INPUT -i $WAN -j REJECT
|
||
|