[ Avaa Bypassed ]




Upload:

Command:

www-data@3.144.134.101: ~ $
#!/usr/bin/perl
# setup.cgi
# Setup an initial save file

require './ipfilter-lib.pl';
&ReadParse();

@rules = ( );
if ($in{'auto'}) {
	$iface = $in{'iface'.$in{'auto'}};
	if ($iface eq 'other') {
		$iface = $in{'iface'.$in{'auto'}.'_other'};
		}
	$iface || &error($text{'setup_eiface'});
	if ($in{'auto'} >= 2) {
		# Block all incoming traffic, except for established
		# connections, DNS replies and safe ICMP types
		# In mode 3 allow ssh and ident too
		# In mode 4 allow ftp, echo-request and high ports too
		push(@rules,
		     { 'action' => 'skip', 'skip' => 1, 'active' => 1,
		       'quick' => 1, 'dir' => 'in',
		       'all' => 1,
		       'on' => $iface,
		       'cmt' => 'Skip next rule for external interface' },
		     { 'action' => 'pass', 'active' => 1,
		       'quick' => 1, 'dir' => 'in',
		       'all' => 1,
		       'keep' => 'state',
		       'cmt' => 'Allow all traffic on internal interface' },
		     { 'action' => 'pass', 'active' => 1,
		       'quick' => 1, 'dir' => 'in',
		       'proto' => 'udp',
		       'from-any' => 1,
		       'to-any' => 1,
		       'to-port-start' => 1024,
		       'to-port-range' => '<>',
		       'to-port-end' => 1024,
		       'keep' => 'state',
		       'cmt' => 'Accept responses to DNS queries' },
		     { 'action' => 'pass', 'active' => 1,
		       'quick' => 1, 'dir' => 'in',
		       'proto' => 'icmp',
		       'all' => 1,
		       'icmp-type' => 'echorep',
		       'keep' => 'state',
		       'cmt' => 'Accept responses to our pings' },
		     { 'action' => 'pass', 'active' => 1,
		       'quick' => 1, 'dir' => 'in',
		       'proto' => 'icmp',
		       'all' => 1,
		       'icmp-type' => 'unreach',
		       'keep' => 'state',
		       'cmt' => 'Accept notifications of unreachable hosts' },
		     { 'action' => 'pass', 'active' => 1,
		       'quick' => 1, 'dir' => 'in',
		       'proto' => 'icmp',
		       'all' => 1,
		       'icmp-type' => 'squench',
		       'keep' => 'state',
		       'cmt' => 'Accept notifications to reduce sending speed' },
		     { 'action' => 'pass', 'active' => 1,
		       'quick' => 1, 'dir' => 'in',
		       'proto' => 'icmp',
		       'all' => 1,
		       'icmp-type' => 'timex',
		       'keep' => 'state',
		       'cmt' => 'Accept notifications of lost packets' },
		     { 'action' => 'pass', 'active' => 1,
		       'quick' => 1, 'dir' => 'in',
		       'proto' => 'icmp',
		       'all' => 1,
		       'icmp-type' => 'paramprob',
		       'keep' => 'state',
		       'cmt' => 'Accept notifications of protocol problems' }
			);
		if ($in{'auto'} >= 3) {
			# Allow ssh and ident
			push(@rules,
			     { 'action' => 'pass', 'active' => 1,
			       'quick' => 1, 'dir' => 'in',
			       'proto' => 'tcp',
			       'from-any' => 1,
			       'to-any' => 1,
			       'to-port-comp' => '=',
			       'to-port-num' => 22,
			       'keep' => 'state',
			       'cmt' => 'Allow connections to our SSH server' },
			     { 'action' => 'pass', 'active' => 1,
			       'quick' => 1, 'dir' => 'in',
			       'proto' => 'tcp',
			       'from-any' => 1,
			       'to-any' => 1,
			       'to-port-comp' => '=',
			       'to-port-num' => 113,
			       'keep' => 'state',
			       'cmt' => 'Allow connections to our IDENT server' },
				);
			}
		if ($in{'auto'} == 4) {
			# Allow pings and most high ports
			push(@rules,
			     { 'action' => 'pass', 'active' => 1,
			       'quick' => 1, 'dir' => 'in',
			       'proto' => 'icmp',
			       'all' => 1,
			       'icmp-type' => 'echo',
			       'keep' => 'state',
			       'cmt' => 'Respond to pings' },
			     { 'action' => 'block', 'active' => 1,
			       'quick' => 1, 'dir' => 'in',
			       'proto' => 'tcp',
			       'from-any' => 1,
			       'to-any' => 1,
			       'to-port-start' => 2049,
			       'to-port-range' => '<>',
			       'to-port-end' => 2050,
			       'keep' => 'state',
			       'cmt' => 'Protect our NFS server' },
			     { 'action' => 'block', 'active' => 1,
			       'quick' => 1, 'dir' => 'in',
			       'proto' => 'tcp',
			       'from-any' => 1,
			       'to-any' => 1,
			       'to-port-start' => 6000,
			       'to-port-range' => '<>',
			       'to-port-end' => 6063,
			       'keep' => 'state',
			       'cmt' => 'Protect our X11 display server' },
			     { 'action' => 'block', 'active' => 1,
			       'quick' => 1, 'dir' => 'in',
			       'proto' => 'tcp',
			       'from-any' => 1,
			       'to-any' => 1,
			       'to-port-start' => 7000,
			       'to-port-range' => '<>',
			       'to-port-end' => 7010,
			       'keep' => 'state',
			       'cmt' => 'Protect our X font server' },
			     { 'action' => 'pass', 'active' => 1,
			       'quick' => 1, 'dir' => 'in',
			       'proto' => 'tcp',
			       'from-any' => 1,
			       'to-any' => 1,
			       'to-port-start' => 1024,
			       'to-port-range' => '<>',
			       'to-port-end' => 65535,
			       'keep' => 'state',
			       'cmt' => 'Allow connections to unprivileged ports' },
				);
			}

		# Add final block rule
		push(@rules, { 'action' => 'block', 'active' => 1,
			       'all' => 1,
			       'dir' => 'in' });
		push(@rules, { 'action' => 'pass', 'active' => 1,
			       'all' => 1,
			       'dir' => 'out' });
		}
	else {
		# Just add one rule for NAT
		push(@natrules, { 'action' => 'map', 'active' => 1,
				  'fromip' => '0.0.0.0', 'frommask' => 0,
				  'toip' => '0.0.0.0', 'tomask' => 32,
				  'iface' => $iface,
				  'type' => 'ipnat' });

		# Allow all other traffic
		push(@rules, { 'action' => 'pass', 'active' => 1,
			       'all' => 1,
			       'dir' => 'in' });
		push(@rules, { 'action' => 'pass', 'active' => 1,
			       'all' => 1,
			       'dir' => 'out' });
		}
	}
else {
	# Just add rules to allow all
	push(@rules, { 'action' => 'pass', 'active' => 1,
		       'all' => 1,
		       'dir' => 'in' });
	push(@rules, { 'action' => 'pass', 'active' => 1,
		       'all' => 1,
		       'dir' => 'out' });
	}
&lock_file($config{'ipf_conf'});
&save_config(\@rules);
&unlock_file($config{'ipf_conf'});
&lock_file($config{'ipnatf_conf'});
&save_config(\@natrules, undef, 'ipnat');
&unlock_file($config{'ipnatf_conf'});
&copy_to_cluster();

if ($in{'atboot'}) {
	&create_firewall_init();
	}

&webmin_log("setup");
&redirect("");



Filemanager

Name Type Size Permission Actions
images Folder 0755
lang Folder 0755
CHANGELOG File 896 B 0644
apply.cgi File 271 B 0755
backup_config.pl File 604 B 0755
bootup.cgi File 252 B 0755
cluster.cgi File 2.01 KB 0755
cluster_add.cgi File 1.78 KB 0755
cluster_delete.cgi File 522 B 0755
config File 155 B 0644
config-freebsd File 149 B 0644
config-solaris-10-ALL File 177 B 0644
config.info File 669 B 0644
config.info.ca File 717 B 0644
config.info.de File 743 B 0644
config.info.nl File 741 B 0644
convert.cgi File 341 B 0755
edit_nat.cgi File 7.83 KB 0755
edit_rule.cgi File 9.81 KB 0755
index.cgi File 8.42 KB 0755
install_check.pl File 337 B 0755
ipfilter-lib.pl File 39.32 KB 0755
log_parser.pl File 928 B 0755
module.info File 198 B 0644
module.info.af File 0 B 0644
module.info.af.auto File 129 B 0644
module.info.ar File 0 B 0644
module.info.ar.auto File 183 B 0644
module.info.be File 0 B 0644
module.info.be.auto File 180 B 0644
module.info.bg File 0 B 0644
module.info.bg.auto File 232 B 0644
module.info.ca File 121 B 0644
module.info.cs File 0 B 0644
module.info.cs.auto File 121 B 0644
module.info.da File 0 B 0644
module.info.da.auto File 117 B 0644
module.info.de File 97 B 0644
module.info.el File 0 B 0644
module.info.el.auto File 239 B 0644
module.info.es File 0 B 0644
module.info.es.auto File 118 B 0644
module.info.eu File 0 B 0644
module.info.eu.auto File 117 B 0644
module.info.fa File 0 B 0644
module.info.fa.auto File 182 B 0644
module.info.fi File 0 B 0644
module.info.fi.auto File 123 B 0644
module.info.fr File 0 B 0644
module.info.fr.auto File 132 B 0644
module.info.he File 0 B 0644
module.info.he.auto File 166 B 0644
module.info.hr File 0 B 0644
module.info.hr.auto File 121 B 0644
module.info.hu File 0 B 0644
module.info.hu.auto File 150 B 0644
module.info.it File 0 B 0644
module.info.it.auto File 130 B 0644
module.info.ja File 0 B 0644
module.info.ja.auto File 179 B 0644
module.info.ko File 0 B 0644
module.info.ko.auto File 140 B 0644
module.info.lt File 0 B 0644
module.info.lt.auto File 144 B 0644
module.info.lv File 0 B 0644
module.info.lv.auto File 134 B 0644
module.info.ms File 0 B 0644
module.info.ms.auto File 125 B 0644
module.info.mt File 0 B 0644
module.info.mt.auto File 123 B 0644
module.info.nl File 26 B 0644
module.info.nl.auto File 109 B 0644
module.info.no File 0 B 0644
module.info.no.auto File 126 B 0644
module.info.pl File 0 B 0644
module.info.pl.auto File 117 B 0644
module.info.pt File 0 B 0644
module.info.pt.auto File 116 B 0644
module.info.pt_BR File 0 B 0644
module.info.pt_BR.auto File 122 B 0644
module.info.ro File 0 B 0644
module.info.ro.auto File 128 B 0644
module.info.ru File 0 B 0644
module.info.ru.auto File 166 B 0644
module.info.sk File 0 B 0644
module.info.sk.auto File 126 B 0644
module.info.sl File 0 B 0644
module.info.sl.auto File 125 B 0644
module.info.sv File 0 B 0644
module.info.sv.auto File 122 B 0644
module.info.th File 0 B 0644
module.info.th.auto File 202 B 0644
module.info.tr File 0 B 0644
module.info.tr.auto File 154 B 0644
module.info.uk File 0 B 0644
module.info.uk.auto File 186 B 0644
module.info.ur File 0 B 0644
module.info.ur.auto File 198 B 0644
module.info.vi File 0 B 0644
module.info.vi.auto File 149 B 0644
module.info.zh File 0 B 0644
module.info.zh.auto File 110 B 0644
module.info.zh_TW File 0 B 0644
module.info.zh_TW.auto File 116 B 0644
move.cgi File 427 B 0755
natmove.cgi File 432 B 0755
save_nat.cgi File 5.06 KB 0755
save_rule.cgi File 4.88 KB 0755
setup.cgi File 6.12 KB 0755
unapply.cgi File 235 B 0755