From 91762973a51687c7eb3cc6a605d7f6c0e0a9e526 Mon Sep 17 00:00:00 2001 From: Darryl Quinn Date: Thu, 11 Jun 2015 01:02:55 -0500 Subject: [PATCH] bugfix: tunnel firewall changes --- files/etc/config.mesh/firewall | 2 ++ files/etc/config.mesh/firewall.tun | 0 files/www/cgi-bin/tunfunc.pm | 13 +++++++------ 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 files/etc/config.mesh/firewall.tun diff --git a/files/etc/config.mesh/firewall b/files/etc/config.mesh/firewall index ac86de33..955bf69a 100644 --- a/files/etc/config.mesh/firewall +++ b/files/etc/config.mesh/firewall @@ -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 diff --git a/files/etc/config.mesh/firewall.tun b/files/etc/config.mesh/firewall.tun new file mode 100644 index 00000000..e69de29b diff --git a/files/www/cgi-bin/tunfunc.pm b/files/www/cgi-bin/tunfunc.pm index 5795f624..a55a36f3 100644 --- a/files/www/cgi-bin/tunfunc.pm +++ b/files/www/cgi-bin/tunfunc.pm @@ -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()