firmware/bsp/default/root_file_system/etc/firewall.user

14 lines
534 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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
#ssh open for debugging purposes, should be removed in stable release
iptables -A INPUT -i $WAN -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -i $WAN -j REJECT