bugfix: tunnel firewall changes

This commit is contained in:
Darryl Quinn 2015-06-11 01:02:55 -05:00
parent 049e8ce364
commit 91762973a5
3 changed files with 9 additions and 6 deletions

View File

@ -83,6 +83,8 @@ config rule
config include
option path /etc/firewall.user
config include
option path /etc/firewall.tun
config rule
option src wan

View File

View File

@ -154,12 +154,13 @@ sub check_freespace()
##########################
sub open_5525_on_wan() {
my $rc;
$rc=&uci_add_sectiontype("firewall","rule");
$rc=&uci_set_indexed_option("firewall","rule","-1","src","wan");
$rc=&uci_set_indexed_option("firewall","rule","-1","dest_port","5525");
$rc=&uci_set_indexed_option("firewall","rule","-1","proto","tcp");
$rc=&uci_set_indexed_option("firewall","rule","-1","target","ACCEPT");
$rc=&uci_commit("firewall");
$rc=&uci_add_sectiontype("firewall.tun","rule");
$rc=&uci_set_indexed_option("firewall.tun","rule","-1","src","wan");
$rc=&uci_set_indexed_option("firewall.tun","rule","-1","dest_port","5525");
$rc=&uci_set_indexed_option("firewall.tun","rule","-1","proto","tcp");
$rc=&uci_set_indexed_option("firewall.tun","rule","-1","target","ACCEPT");
$rc=&uci_commit("firewall.tun");
$rc=&uci_clone("firewall.tun");
}
sub vpn_setup_required()