X7ROOT File Manager
Current Path:
/usr/libexec/webmin/firewall
usr
/
libexec
/
webmin
/
firewall
/
📁
..
📄
CHANGELOG
(2.79 KB)
📄
acl_security.pl
(1.41 KB)
📄
apply.cgi
(512 B)
📄
backup_config.pl
(649 B)
📄
bootup.cgi
(600 B)
📄
cgi_args.pl
(430 B)
📄
cluster.cgi
(2.08 KB)
📄
cluster_add.cgi
(2.19 KB)
📄
cluster_delete.cgi
(651 B)
📄
coherent-linux-lib.pl
(1.54 KB)
📄
config
(83 B)
📄
config.info
(1.23 KB)
📄
config.info.bg
(2.48 KB)
📄
config.info.ca
(1.5 KB)
📄
config.info.cs
(982 B)
📄
config.info.de
(1.42 KB)
📄
config.info.fr
(1.63 KB)
📄
config.info.ja
(421 B)
📄
config.info.nl
(976 B)
📄
config.info.no
(968 B)
📄
config.info.pl
(1012 B)
📄
config.info.pt_BR
(983 B)
📄
config.info.ru
(1.31 KB)
📄
config.info.sk
(989 B)
📄
config.info.tr
(827 B)
📄
convert.cgi
(756 B)
📄
debian-linux-lib.pl
(4.59 KB)
📄
defaultacl
(100 B)
📄
edit_rule.cgi
(14.88 KB)
📄
firewall-lib.pl
(17.32 KB)
📄
firewall4-lib.pl
(1.82 KB)
📄
firewall6-lib.pl
(1.76 KB)
📄
gentoo-linux-lib.pl
(722 B)
📁
help
📁
images
📄
index.cgi
(16.42 KB)
📄
install_check.pl
(841 B)
📁
lang
📄
log_parser.pl
(835 B)
📄
mandrake-linux-lib.pl
(1.69 KB)
📄
module.info
(207 B)
📄
module.info.af
(0 B)
📄
module.info.af.auto
(173 B)
📄
module.info.ar
(0 B)
📄
module.info.ar.auto
(258 B)
📄
module.info.be
(0 B)
📄
module.info.be.auto
(271 B)
📄
module.info.bg
(0 B)
📄
module.info.bg.auto
(292 B)
📄
module.info.ca
(150 B)
📄
module.info.ca.auto
(17 B)
📄
module.info.cs
(24 B)
📄
module.info.cs.auto
(148 B)
📄
module.info.da
(0 B)
📄
module.info.da.auto
(167 B)
📄
module.info.de
(155 B)
📄
module.info.de.auto
(17 B)
📄
module.info.el
(0 B)
📄
module.info.el.auto
(331 B)
📄
module.info.es
(26 B)
📄
module.info.es.auto
(149 B)
📄
module.info.eu
(0 B)
📄
module.info.eu.auto
(160 B)
📄
module.info.fa
(0 B)
📄
module.info.fa.auto
(272 B)
📄
module.info.fi
(0 B)
📄
module.info.fi.auto
(192 B)
📄
module.info.fr
(0 B)
📄
module.info.fr.auto
(173 B)
📄
module.info.he
(0 B)
📄
module.info.he.auto
(243 B)
📄
module.info.hr
(0 B)
📄
module.info.hr.auto
(166 B)
📄
module.info.hu
(33 B)
📄
module.info.hu.auto
(172 B)
📄
module.info.it
(0 B)
📄
module.info.it.auto
(167 B)
📄
module.info.ja
(39 B)
📄
module.info.ja.auto
(218 B)
📄
module.info.ko
(0 B)
📄
module.info.ko.auto
(198 B)
📄
module.info.lt
(0 B)
📄
module.info.lt.auto
(197 B)
📄
module.info.lv
(0 B)
📄
module.info.lv.auto
(174 B)
📄
module.info.ms
(158 B)
📄
module.info.ms.auto
(17 B)
📄
module.info.mt
(0 B)
📄
module.info.mt.auto
(181 B)
📄
module.info.nl
(23 B)
📄
module.info.nl.auto
(157 B)
📄
module.info.no
(23 B)
📄
module.info.no.auto
(146 B)
📄
module.info.pl
(141 B)
📄
module.info.pl.auto
(23 B)
📄
module.info.pt
(0 B)
📄
module.info.pt.auto
(170 B)
📄
module.info.pt_BR
(26 B)
📄
module.info.pt_BR.auto
(150 B)
📄
module.info.ro
(0 B)
📄
module.info.ro.auto
(178 B)
📄
module.info.ru
(51 B)
📄
module.info.ru.auto
(241 B)
📄
module.info.sk
(24 B)
📄
module.info.sk.auto
(174 B)
📄
module.info.sl
(0 B)
📄
module.info.sl.auto
(174 B)
📄
module.info.sv
(0 B)
📄
module.info.sv.auto
(174 B)
📄
module.info.th
(0 B)
📄
module.info.th.auto
(306 B)
📄
module.info.tr
(0 B)
📄
module.info.tr.auto
(215 B)
📄
module.info.uk
(0 B)
📄
module.info.uk.auto
(277 B)
📄
module.info.ur
(0 B)
📄
module.info.ur.auto
(307 B)
📄
module.info.vi
(0 B)
📄
module.info.vi.auto
(204 B)
📄
module.info.zh
(0 B)
📄
module.info.zh.auto
(145 B)
📄
module.info.zh_TW
(0 B)
📄
module.info.zh_TW.auto
(154 B)
📄
move.cgi
(1.29 KB)
📄
newchain.cgi
(898 B)
📄
open-ports.pl
(3.4 KB)
📄
prefs.info
(55 B)
📄
redhat-linux-lib.pl
(2.14 KB)
📄
save_policy.cgi
(7.15 KB)
📄
save_rule.cgi
(12.4 KB)
📄
save_rule6.cgi
(12.04 KB)
📄
setup.cgi
(9.36 KB)
📄
setup6.cgi
(8.12 KB)
📄
trustix-linux-lib.pl
(2.14 KB)
📄
unapply.cgi
(609 B)
Editing: debian-linux-lib.pl
# debians-linux-lib.pl # Deal with debian's iptables save file and startup script &foreign_require("init"); if ($gconfig{'os_version'} >= 3.1 && !-r "/etc/init.d/ip${ipvx}tables" && !-r "/etc/init.d/webmin-ip${ipvx}tables" && !$config{'force_init'} && !-d "/etc/netplan" && !-d "/etc/iptables") { # In newer Debians, IPtable is started by the network init script, # unless netplan is in use $has_new_debian_iptables = 1; $ip6tables_save_file = "/etc/ip6tables.up.rules"; $iptables_save_file = "/etc/iptables.up.rules"; $debian_init_script = "ip${ipvx}tables"; } elsif (-d "/etc/iptables") { # Ubuntu 20 uses files in /etc/iptables if iptables-persistent is # installed. However, on Debian 10 there is no init script! $ip6tables_save_file = "/etc/iptables/rules.v6"; $iptables_save_file = "/etc/iptables/rules.v4"; $debian_init_script = $ipvx == 4 ? "iptables" : "ip6tables"; } else { # Older Debians use an init script $has_debian_iptables = -r "/etc/init.d/iptables"; $debian_ip6tables_dir = "/var/lib/ip6tables"; $debian_iptables_dir = "/var/lib/iptables"; if ($has_debian_iptables) { $debian_init_script = "iptables"; mkdir($debian_ip6tables_dir, 0755) if (!-d $debian_ip6tables_dir); mkdir($debian_iptables_dir, 0755) if (!-d $debian_iptables_dir); $iptables_save_file = "$debian_iptables_dir/active"; $ip6tables_save_file = "$debian_ip6tables_dir/active"; } } if (!&init::action_status($debian_init_script)) { # Expected script doesn't exist! $debian_init_script = undef; } # apply_iptables() # Applies the current iptables configuration from the save file sub apply_iptables { if ($debian_init_script) { my ($ok, $err) = &init::restart_action($debian_init_script); return $ok ? undef : &html_escape($err); } else { return &iptables_restore(); } } # unapply_iptables() # Writes the current iptables configuration to the save file sub unapply_iptables { if ($has_debian_iptables) { # On some debian versions the init script can do this $out = &backquote_logged("cd / ; /etc/init.d/ip${ipvx}tables save active 2>&1 </dev/null"); return $? ? "<pre>$out</pre>" : undef; } else { return &iptables_save(); } } # started_at_boot() sub started_at_boot { if ($debian_init_script) { # Check Debian init script return &init::action_status($debian_init_script) == 2; } elsif ($has_new_debian_iptables) { # Check network interface config local $pri = &get_primary_network_interface(); local ($debpri) = grep { $_->[0] eq $pri->{'fullname'} } &net::get_interface_defs(); foreach my $o (@{$debpri->[3]}) { if (($o->[0] eq "pre-up" || $o->[0] eq "post-up") && $o->[1] =~ /\S*ip${ipvx}tables-restore\s+<\s+(\S+)/ && $1 eq $ipvx_save) { return 1; } } } else { # Check Webmin init script return &init::action_status("webmin-ip${ipvx}tables") == 2; } } sub enable_at_boot { if ($debian_init_script) { # Enable the init script (assumes it exists) &init::action_status($debian_init_script) > 0 || &error("Bootup action $debian_init_script does not exist"); &init::enable_at_boot($debian_init_script); } elsif ($has_new_debian_iptables) { # Add to network interface config local $pri = &get_primary_network_interface(); local ($debpri) = grep { $_->[0] eq $pri->{'fullname'} } &net::get_interface_defs(); if ($debpri && !&started_at_boot()) { push(@{$debpri->[3]}, [ "post-up", "ip${ipvx}tables-restore < $ipvx_save" ]); &net::modify_interface_def(@$debpri); } } else { &create_webmin_init(); } } sub disable_at_boot { if ($debian_init_script) { # Turn off the init script &init::disable_at_boot($debian_init_script); } elsif ($has_new_debian_iptables) { # Remove from network interface config local $pri = &get_primary_network_interface(); local ($debpri) = grep { $_->[0] eq $pri->{'fullname'} } &net::get_interface_defs(); @{$debpri->[3]} = grep { ($_->[0] ne "pre-up" && $_->[0] ne "post-up") || $_->[1] !~ /^\S*ip${ipvx}tables/ } @{$debpri->[3]}; &net::modify_interface_def(@$debpri); } else { &init::disable_at_boot("webmin-ip${ipvx}tables"); } } sub get_primary_network_interface { &foreign_require("net"); local @boot = sort { $a->{'fullname'} cmp $b->{'fullname'} } &net::boot_interfaces(); local $pri; if ($config{'iface'}) { ($pri) = grep { $_->{'fullname'} eq $config{'iface'} } @boot; } local ($eth) = grep { $_->{'fullname'} =~ /^eth\d+$/ } @boot; local ($ppp) = grep { $_->{'fullname'} =~ /^ppp\d+$/ } @boot; local ($venetn) = grep { $_->{'fullname'} =~ /^venet\d+:\d+$/ } @boot; local ($venet) = grep { $_->{'fullname'} =~ /^venet\d+$/ } @boot; return $pri || $eth || $ppp || $venetn || $venet || $boot[0]; } 1;
Upload File
Create Folder