From f31189a08db3c971376301e2d51b0a4f3f58dadd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 2 May 2022 10:17:56 +0200 Subject: [PATCH] [viwib] allow ssh in for people to remotely access their router --- openwrt/viwib-2-configure.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openwrt/viwib-2-configure.sh b/openwrt/viwib-2-configure.sh index 47a93ef..1f1711c 100755 --- a/openwrt/viwib-2-configure.sh +++ b/openwrt/viwib-2-configure.sh @@ -174,6 +174,15 @@ uci set firewall.@rule[-1].dest_port='80' uci set firewall.@rule[-1].target='ACCEPT' fi +if ! uci show firewall | grep "name='Allow-SSH-in'"; then +uci add firewall rule +uci set firewall.@rule[-1].name='Allow-SSH-in' +uci set firewall.@rule[-1].src='wan' +uci set firewall.@rule[-1].proto='tcp' +uci set firewall.@rule[-1].dest_port='22' +uci set firewall.@rule[-1].target='ACCEPT' +fi + # Add interfaces to the right network zone uci set firewall.@zone[1].network='wan wan6 wg0'