]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - html/cgi-bin/iptables.cgi
"Update Booster" fertiggestellt und getestet.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / iptables.cgi
CommitLineData
a68fedca
MT
1#!/usr/bin/perl
2#
3# IPFire CGIs
4#
5# This code is distributed under the terms of the GPL
6#
7
8require '/var/ipfire/general-functions.pl';
9require "${General::swroot}/lang.pl";
10require "${General::swroot}/header.pl";
11
12my @iplines;
13my $lines = 0;
14my @ipmanlines;
15my $manlines = 0;
16my @ipnatlines;
17my $natlines = 0;
18
19system('/usr/local/bin/getipstat');
20
21&Header::showhttpheaders();
22&Header::openpage($Lang::tr{'ipts'}, 1, '');
23&Header::openbigbox('100%', 'LEFT');
24&Header::openbox('100%', 'LEFT', $Lang::tr{'ipts'}.':');
25print <<END
26
27 <DIV align='left'>
28 <PRE>
29END
30;
55b4c7ed 31 open (FILE, '/srv/web/ipfire/html/iptables.txt');
a68fedca
MT
32 while (<FILE>)
33 {
34 $iplines[$lines] = $_;
35 $lines++;
36 }
37 close (FILE);
38 foreach $_ (@iplines) {
39 print "$_"; }
40
41print <<END
42 </PRE>
43 </DIV>
44 <BR>
45
46END
47;
48&Header::closebox();
49
50## MANGLE
51&Header::openbox('100%', 'LEFT', $Lang::tr{'iptmangles'}.':');
52print <<END
53
54 <DIV align='left'>
55 <PRE>
56END
57;
55b4c7ed 58 open (FILEMAN, '/srv/web/ipfire/html/iptablesmangle.txt');
a68fedca
MT
59 while (<FILEMAN>)
60 {
61 $ipmanlines[$manlines] = $_;
62 $manlines++;
63 }
64 close (FILEMAN);
65 foreach $_ (@ipmanlines) {
66 print "$_"; }
67
68print <<END
69 </PRE>
70 </DIV>
71 <BR>
72
73END
74;
75&Header::closebox();
76
77## NAT
78&Header::openbox('100%', 'LEFT', $Lang::tr{'iptnats'}.':');
79print <<END
80
81 <DIV align='left'>
82 <PRE>
83END
84;
55b4c7ed 85 open (FILENAT, '/srv/web/ipfire/html/iptablesnat.txt');
a68fedca
MT
86 while (<FILENAT>)
87 {
88 $ipnatlines[$natlines] = $_;
89 $natlines++;
90 }
91 close (FILENAT);
92 foreach $_ (@ipnatlines) {
93 print "$_"; }
94
95print <<END
96 </PRE>
97 </DIV>
98 <BR>
99
100END
101;
102&Header::closebox();
103&Header::closebigbox();
104&Header::closepage();
483f59cd 105
55b4c7ed
MT
106system(rm -f "/srv/web/ipfire/html/iptables.txt");
107system(rm -f "/srv/web/ipfire/html/iptablesmangle.txt");
108system(rm -f "/srv/web/ipfire/html/iptablesnat.txt");