Changeset 8884

Show
Ignore:
Timestamp:
07/09/12 18:57:24 (11 months ago)
Author:
soma
Message:

contrib/meshwizard: allowssh and allowweb can be set for wan dhcp proto too now

Location:
luci/trunk/contrib/package/meshwizard/files/usr/bin/meshwizard
Files:
1 added
3 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_firewall.sh

    r8699 r8884  
    110110fi 
    111111 
     112# Firewall rules to allow incoming ssh and web if enabled 
     113 
     114if [ "$wan_allowssh" == 1 ]; then 
     115    uci batch <<- EOF 
     116        set firewall.wanssh=rule 
     117        set firewall.wanssh.src=wan 
     118        set firewall.wanssh.target=ACCEPT 
     119        set firewall.wanssh.proto=tcp 
     120        set firewall.wanssh.dest_port=22 
     121    EOF 
     122fi 
     123 
     124if [ "$wan_allowweb" == 1 ]; then 
     125    uci batch <<- EOF 
     126        set firewall.wanweb=rule 
     127        set firewall.wanweb.src=wan 
     128        set firewall.wanweb.target=ACCEPT 
     129        set firewall.wanweb.proto=tcp 
     130        set firewall.wanweb.dest_port=80 
     131        set firewall.wanwebhttps=rule 
     132        set firewall.wanwebhttps.src=wan 
     133        set firewall.wanwebhttps.target=ACCEPT 
     134        set firewall.wanwebhttps.proto=tcp 
     135        set firewall.wanwebhttps.dest_port=443 
     136    EOF 
     137fi 
     138 
    112139uci_commitverbose "Setup rules, forwardings, advanced config and includes." firewall 
  • luci/trunk/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wan_static.sh

    r8697 r8884  
    1919uci delete meshwizard.wan && uci commit meshwizard 
    2020 
    21 # Firewall rules to allow incoming ssh and web 
    22  
    23 if [ "$wan_allowssh" == 1 ]; then 
    24     uci batch <<- EOF 
    25         set firewall.wanssh=rule 
    26         set firewall.wanssh.src=wan 
    27         set firewall.wanssh.target=ACCEPT 
    28         set firewall.wanssh.proto=tcp 
    29         set firewall.wanssh.dest_port=22 
    30     EOF 
    31     uci_commitverbose "Allow incoming connections to port 22 (ssh) on wan" firewall 
    32 fi 
    33  
    34 if [ "$wan_allowweb" == 1 ]; then 
    35     uci batch <<- EOF 
    36         set firewall.wanweb=rule 
    37         set firewall.wanweb.src=wan 
    38         set firewall.wanweb.target=ACCEPT 
    39         set firewall.wanweb.proto=tcp 
    40         set firewall.wanweb.dest_port=80 
    41         set firewall.wanwebhttps=rule 
    42         set firewall.wanwebhttps.src=wan 
    43         set firewall.wanwebhttps.target=ACCEPT 
    44         set firewall.wanwebhttps.proto=tcp 
    45         set firewall.wanwebhttps.dest_port=443 
    46     EOF 
    47     uci_commitverbose "Allow incoming connections to port 80 and 443 (http and https) on wan" firewall 
    48 fi 
  • luci/trunk/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh

    r8799 r8884  
    6565fi 
    6666 
     67if [ "$wan_proto" == "dhcp" ]; then 
     68    $dir/helpers/setup_wan_dhcp.sh 
     69fi 
     70 
    6771if [ "$lan_proto" == "static" ] && [ -n "$lan_ip4addr" ] && [ -n "$lan_netmask" ]; then 
    6872    $dir/helpers/setup_lan_static.sh