X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=wrt-setup-local;h=00420030e328388d7ac79b000ee168cb420c7e18;hb=a199d585d33ace63662c0fea99a5c5d6d498d14b;hp=6201f866f924cce43312e5d25b047b62e2897c19;hpb=b5682902b6dce0a3d799e129877c8b43c4509774;p=automated-distro-installer diff --git a/wrt-setup-local b/wrt-setup-local index 6201f86..0042003 100755 --- a/wrt-setup-local +++ b/wrt-setup-local @@ -40,11 +40,6 @@ EOF -dnsmasq_restart=false -firewall_restart=false -dev2=false -test=false -libremanage_host=wrt2 secrets=false if [[ -e /root/router-secrets ]]; then @@ -58,6 +53,12 @@ fi : ${hostname:=wrt} +dnsmasq_restart=false +firewall_restart=false +dev2=false +test=false +client=false +libremanage_host=wrt2 lanip=1 while getopts hm:t: opt; do case $opt in @@ -317,6 +318,9 @@ if $client; then uset wireless.radio0.disabled false uset wireless.radio1.disabled true else + # defaults, just reseting in case client config ran + uset wireless.default_radio0.network lan + uset wireless.default_radio0.mode ap for x in 0 1; do uset wireless.default_radio$x.ssid "$ssid" uset wireless.default_radio$x.key $key @@ -573,6 +577,18 @@ config rule option target ACCEPT option dest_port 2208 +config redirect + option name sshbb8 + option src wan + option src_dport 2209 + option dest_port 22 + option dest_ip $l.9 + option dest lan +config rule + option src wan + option target ACCEPT + option dest_port 2209 + config redirect option name icecast option src wan @@ -600,21 +616,7 @@ config rule config redirect - option name vpntp - option src wan - option src_dport 1196 - option dest lan - option dest_ip $l.8 - option proto udp -config rule - option src wan - option target ACCEPT - option dest_port 1196 - option proto udp - - -config redirect - option name httptp + option name httpkd option src wan option src_dport 80 option dest lan @@ -627,7 +629,7 @@ config rule option proto tcp config redirect - option name httpstp + option name httpskd option src wan option src_dport 443 option dest lan @@ -698,46 +700,26 @@ EOF } firewall-cedit || firewall_restart=true -if ! uci get firewall.@zone[1].network | grep wg0 &>/dev/null; then - # cant mix cedit plus uci - echo | cedit /etc/config/firewall ||: - uci add_list firewall.@zone[1].network=wg0 - uci commit firewall - firewall-cedit ||: - firewall_restart=true -fi +# not using wireguard for now +# if ! uci get firewall.@zone[1].network | grep wg0 &>/dev/null; then +# # cant mix cedit plus uci +# echo | cedit /etc/config/firewall ||: +# uci add_list firewall.@zone[1].network=wg0 +# uci commit firewall +# firewall-cedit ||: +# firewall_restart=true +# fi v cedit /etc/hosts < 2.80. currently at 2.80. + # todo: download https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/base/dnsmasq-full_2.84-1_mipsel_24kc.ipk + # and install it. then we can turn off dnssec in systemd-resolved + # + # Also, reload of dnsmasq seems to break things, wifi + # clients were not getting internet connectivity. v /etc/init.d/dnsmasq restart fi