OpenWRT na wrt160nl – otwieranie portów w firewallu


Na zainstalowanym już openwrt na moim Linksysie wrt160nl potrzebowałem otworzyć parę portów do działania podstawowych funkcji takich jak ssh, ftp, interfejs luci, transmission wszystkie te usługi chciałem mieć dostępne od strony wan 🙂

No więc do rzeczy, łączymy się do routera za pomocą konsoli albo putty i ustawiamy:

uci add firewall rule
uci set firewall.@rule[-1]._name=ssh
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=tcp
uci set firewall.@rule[-1].dest_port=22
uci commit firewall

uci add firewall rule
uci set firewall.@rule[-1]._name=ssh_44
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=tcp
uci set firewall.@rule[-1].dest_port=44
uci commit firewall

uci add firewall rule
uci set firewall.@rule[-1]._name=ftp
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=tcp
uci set firewall.@rule[-1].dest_port=21
uci commit firewall

uci add firewall rule
uci set firewall.@rule[-1]._name=transmission
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=tcp
uci set firewall.@rule[-1].dest_port=9091
uci commit firewall

uci add firewall rule
uci set firewall.@rule[-1]._name=luci_wan
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=tcp
uci set firewall.@rule[-1].dest_port=443
uci commit firewall

Dodaj komentarz

Twój adres e-mail nie zostanie opublikowany. Wymagane pola są oznaczone *

Witryna wykorzystuje Akismet, aby ograniczyć spam. Dowiedz się więcej jak przetwarzane są dane komentarzy.