Uname:Linux server2.hostofiraq.site 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64

Base Dir : /home/iscmbt-kufa-atu/public_html

User : iscmbt-kufa-atu


403WebShell
403Webshell
Server IP : 89.117.53.150  /  Your IP : 216.73.216.11
Web Server : Apache
System : Linux server2.hostofiraq.site 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
User : iscmbt-kufa-atu ( 1014)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/webmin/nftables/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/webmin/nftables/manage_forward.cgi
#!/usr/bin/perl
# manage_forward.cgi
# Quickly add a simple port forward in the selected table

require './nftables-lib.pl';    ## no critic
use strict;
use warnings;
our (%in, %text);
ReadParse();
assert_quick_acl('forward');
error_setup($text{'quick_forward_err'});

my @tables = get_nftables_save();
my $table_idx = $in{'table'};
my $table;
if (defined($in{'table_family'}) && defined($in{'table_name'})) {
	for (my $i = 0 ; $i <= $#tables ; $i++) {
		if ($tables[$i]->{'family'} eq $in{'table_family'} &&
			$tables[$i]->{'name'} eq $in{'table_name'})
		{
			$table_idx = $i;
			$table = $tables[$i];
			last;
			}
		}
	}
else {
	$table = $tables[$table_idx];
	}
$table || error($text{'quick_etable'});
assert_table_acl($table);

my $err = add_quick_forward_rule(
	$table,
	$in{'src_port'},
	$in{'proto'},
	$in{'dst_port'},
	$in{'dst_addr'}
);
error($err) if ($err);

$err = save_table_configuration($table, @tables);
error(text('quick_failed', $err)) if ($err);

# Quick forwarding is expected to affect the live firewall immediately.
$err = apply_restore();
error(text('quick_failed', $err)) if ($err);

webmin_log(
	"create",
	"forward",
	$in{'src_port'},
	{'table' => $table->{'name'}, 'family' => $table->{'family'}}
);
my $redir = "index.cgi?table_family=".
	    urlize($table->{'family'}).
	    "&table_name=".
	    urlize($table->{'name'});
$redir .= "&view=".urlize($in{'view'})
	if (($in{'view'} || '') =~ /^(chains|sets)$/);
redirect($redir);

Youez - 2016 - github.com/yon3zu
LinuXploit