From af0e26dd84ceac5b1b4978ca67b8b349049fd721 Mon Sep 17 00:00:00 2001 From: Trevor Paskett Date: Mon, 20 Aug 2018 13:09:47 -0600 Subject: [PATCH] config change to make uhttpd listen on port 80 and 8080 (#142) * config change to make uhttpd listen on port 80 and 8080 * add port 80 to tunnel firewall rules * add port 80 to tunnel firewall rules in config, update help * firewall rules for wan + dtdlink --- files/etc/config.ap/firewall | 12 ++++++++++++ files/etc/config.ap/uhttpd | 1 + files/etc/config.client/firewall | 12 ++++++++++++ files/etc/config.client/uhttpd | 1 + files/etc/config.mesh/firewall | 18 ++++++++++++++++++ files/etc/config.mesh/uhttpd | 1 + files/etc/config.mesh_ap/firewall | 12 ++++++++++++ files/etc/config.mesh_ap/uhttpd | 1 + files/etc/config.router/firewall | 12 ++++++++++++ files/etc/config.router/uhttpd | 1 + files/etc/config/firewall | 6 ++++++ files/etc/config/uhttpd | 1 + files/etc/local/mesh-firewall/01-tunnels | 1 + files/www/help.html | 11 ++++++----- 14 files changed, 85 insertions(+), 5 deletions(-) diff --git a/files/etc/config.ap/firewall b/files/etc/config.ap/firewall index 816720d8..cf8432e8 100644 --- a/files/etc/config.ap/firewall +++ b/files/etc/config.ap/firewall @@ -62,6 +62,12 @@ config rule option proto tcp option target ACCEPT +config rule + option src wan + option dest_port 80 + option proto tcp + option target ACCEPT + config rule option src wifi option dest_port 2222 @@ -74,6 +80,12 @@ config rule option proto tcp option target ACCEPT +config rule + option src wifi + option dest_port 80 + option proto tcp + option target ACCEPT + config rule option src wifi option dest_port 698 diff --git a/files/etc/config.ap/uhttpd b/files/etc/config.ap/uhttpd index ceab7632..7e65aafb 100644 --- a/files/etc/config.ap/uhttpd +++ b/files/etc/config.ap/uhttpd @@ -3,6 +3,7 @@ config uhttpd main # HTTP listen addresses, multiple allowed list listen_http 0.0.0.0:8080 + list listen_http 0.0.0.0:80 option home /www option rfc1918_filter 1 option cgi_prefix /cgi-bin diff --git a/files/etc/config.client/firewall b/files/etc/config.client/firewall index 816720d8..cf8432e8 100644 --- a/files/etc/config.client/firewall +++ b/files/etc/config.client/firewall @@ -62,6 +62,12 @@ config rule option proto tcp option target ACCEPT +config rule + option src wan + option dest_port 80 + option proto tcp + option target ACCEPT + config rule option src wifi option dest_port 2222 @@ -74,6 +80,12 @@ config rule option proto tcp option target ACCEPT +config rule + option src wifi + option dest_port 80 + option proto tcp + option target ACCEPT + config rule option src wifi option dest_port 698 diff --git a/files/etc/config.client/uhttpd b/files/etc/config.client/uhttpd index ceab7632..7e65aafb 100644 --- a/files/etc/config.client/uhttpd +++ b/files/etc/config.client/uhttpd @@ -3,6 +3,7 @@ config uhttpd main # HTTP listen addresses, multiple allowed list listen_http 0.0.0.0:8080 + list listen_http 0.0.0.0:80 option home /www option rfc1918_filter 1 option cgi_prefix /cgi-bin diff --git a/files/etc/config.mesh/firewall b/files/etc/config.mesh/firewall index 89db032f..673422c1 100644 --- a/files/etc/config.mesh/firewall +++ b/files/etc/config.mesh/firewall @@ -99,6 +99,12 @@ config rule option proto tcp option target ACCEPT +config rule + option src wan + option dest_port 80 + option proto tcp + option target ACCEPT + config rule option src wifi option dest_port 2222 @@ -111,6 +117,12 @@ config rule option proto tcp option target ACCEPT +config rule + option src wifi + option dest_port 80 + option proto tcp + option target ACCEPT + config rule option src wifi option dest_port 698 @@ -135,6 +147,12 @@ config rule option proto tcp option target ACCEPT +config rule + option src dtdlink + option dest_port 80 + option proto tcp + option target ACCEPT + config rule option src dtdlink option dest_port 698 diff --git a/files/etc/config.mesh/uhttpd b/files/etc/config.mesh/uhttpd index ceab7632..7e65aafb 100644 --- a/files/etc/config.mesh/uhttpd +++ b/files/etc/config.mesh/uhttpd @@ -3,6 +3,7 @@ config uhttpd main # HTTP listen addresses, multiple allowed list listen_http 0.0.0.0:8080 + list listen_http 0.0.0.0:80 option home /www option rfc1918_filter 1 option cgi_prefix /cgi-bin diff --git a/files/etc/config.mesh_ap/firewall b/files/etc/config.mesh_ap/firewall index eb425377..73fe4cf7 100644 --- a/files/etc/config.mesh_ap/firewall +++ b/files/etc/config.mesh_ap/firewall @@ -60,6 +60,12 @@ config rule option proto tcp option target ACCEPT +config rule + option src wan + option dest_port 80 + option proto tcp + option target ACCEPT + config rule option src wifi option dest_port 2222 @@ -72,6 +78,12 @@ config rule option proto tcp option target ACCEPT +config rule + option src wifi + option dest_port 80 + option proto tcp + option target ACCEPT + config rule option src wifi option dest_port 698 diff --git a/files/etc/config.mesh_ap/uhttpd b/files/etc/config.mesh_ap/uhttpd index ceab7632..7e65aafb 100644 --- a/files/etc/config.mesh_ap/uhttpd +++ b/files/etc/config.mesh_ap/uhttpd @@ -3,6 +3,7 @@ config uhttpd main # HTTP listen addresses, multiple allowed list listen_http 0.0.0.0:8080 + list listen_http 0.0.0.0:80 option home /www option rfc1918_filter 1 option cgi_prefix /cgi-bin diff --git a/files/etc/config.router/firewall b/files/etc/config.router/firewall index 816720d8..cf8432e8 100644 --- a/files/etc/config.router/firewall +++ b/files/etc/config.router/firewall @@ -62,6 +62,12 @@ config rule option proto tcp option target ACCEPT +config rule + option src wan + option dest_port 80 + option proto tcp + option target ACCEPT + config rule option src wifi option dest_port 2222 @@ -74,6 +80,12 @@ config rule option proto tcp option target ACCEPT +config rule + option src wifi + option dest_port 80 + option proto tcp + option target ACCEPT + config rule option src wifi option dest_port 698 diff --git a/files/etc/config.router/uhttpd b/files/etc/config.router/uhttpd index ceab7632..7e65aafb 100644 --- a/files/etc/config.router/uhttpd +++ b/files/etc/config.router/uhttpd @@ -3,6 +3,7 @@ config uhttpd main # HTTP listen addresses, multiple allowed list listen_http 0.0.0.0:8080 + list listen_http 0.0.0.0:80 option home /www option rfc1918_filter 1 option cgi_prefix /cgi-bin diff --git a/files/etc/config/firewall b/files/etc/config/firewall index fb9e8afe..f4041a09 100644 --- a/files/etc/config/firewall +++ b/files/etc/config/firewall @@ -68,6 +68,12 @@ config rule option proto tcp option target ACCEPT +config rule + option src wifi + option dest_port 80 + option proto tcp + option target ACCEPT + config rule option src wifi option dest_port 698 diff --git a/files/etc/config/uhttpd b/files/etc/config/uhttpd index ceab7632..7e65aafb 100644 --- a/files/etc/config/uhttpd +++ b/files/etc/config/uhttpd @@ -3,6 +3,7 @@ config uhttpd main # HTTP listen addresses, multiple allowed list listen_http 0.0.0.0:8080 + list listen_http 0.0.0.0:80 option home /www option rfc1918_filter 1 option cgi_prefix /cgi-bin diff --git a/files/etc/local/mesh-firewall/01-tunnels b/files/etc/local/mesh-firewall/01-tunnels index 9aff0556..7f3299c9 100755 --- a/files/etc/local/mesh-firewall/01-tunnels +++ b/files/etc/local/mesh-firewall/01-tunnels @@ -59,6 +59,7 @@ if [ $rules_exist -eq 0 ] ; then iptables -A zone_vpn_input -p icmp -m icmp --icmp-type 8 -j ACCEPT iptables -A zone_vpn_input -p tcp -m tcp --dport 2222 -j ACCEPT iptables -A zone_vpn_input -p tcp -m tcp --dport 8080 -j ACCEPT + iptables -A zone_vpn_input -p tcp -m tcp --dport 80 -j ACCEPT iptables -A zone_vpn_input -p udp -m udp --dport 698 -j ACCEPT iptables -A zone_vpn_input -p tcp -m tcp --dport 1978 -j ACCEPT iptables -A zone_vpn_input -p tcp -m tcp --dport 23 -j ACCEPT diff --git a/files/www/help.html b/files/www/help.html index e7acf566..fa29c971 100644 --- a/files/www/help.html +++ b/files/www/help.html @@ -29,7 +29,7 @@ Table of Contents: Please take note: -To see a sample of the information that will be sent to the AREDN server, click HERE and HERE. (You can replace "localnode" with your ACTUAL node name to see the data from that node.)
+To see a sample of the information that will be sent to the AREDN server, click HERE and HERE. (You can replace "localnode" with your ACTUAL node name to see the data from that node.)

You may set the timezone where the node is located as well as setting the NTP server that the node will connect to. A "Save Changes" button click IS required for timezone and NTS server settings, as well as a subsequent reboot. @@ -505,7 +505,8 @@ is set up. Here are some common ports:

  • 698 olsr - optimized link state routing
  • 1978 olsr http - olsr's web interface
  • 2222 node ssh server
  • -
  • 8080 node web server
  • +
  • 8080 node web server (old port)
  • +
  • 80 node web server
  • So then what is port forwarding? Port forwarding is taking an inbound