Skip to content

Commit

Permalink
fix(fw/pre): fix open server port
Browse files Browse the repository at this point in the history
Signed-off-by: Tianling Shen <[email protected]>
  • Loading branch information
1715173329 committed Jul 12, 2024
1 parent 29a884e commit 191f0ef
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions root/etc/homeproxy/scripts/firewall_pre.ut
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ chain input {
iifname {{ tun_name }} counter accept comment "!{{ cfgname }}: accept tun input"
{% endif %}
{%
uci.foreach(cfgname, 'server', (s) => {
if (s.enabled !== '1')
return;

let proto = s.network || '{ tcp, udp }';
printf(' meta l4proto %s th dport %s counter accept comment "!%s: accept server %s"\n',
proto, s.port, cfgname, s['.name']);
});
if (auto_firewall === '1')
uci.foreach(cfgname, 'server', (s) => {
if (s.enabled !== '1')
return;

let proto = s.network || '{ tcp, udp }';
printf(' meta l4proto %s th dport %s counter accept comment "!%s: accept server %s"\n',
proto, s.port, cfgname, s['.name']);
});
%}
}
{% endif %}

0 comments on commit 191f0ef

Please sign in to comment.