mirror of
https://github.com/webmin/webmin.git
synced 2026-09-19 20:10:38 +01:00
Show SNAT inputs in custom NAT chains
This commit is contained in:
@@ -17,3 +17,5 @@ The ICMP rejection type is now settable in all valid chains.
|
||||
On Debian 3.1 systems, IPtables rules are saved in /etc/iptables.up.rules and activated through /etc/network/interfaces, rather than using an init.d script.
|
||||
---- Changes since 1.350 ----
|
||||
Added a setup option to configure a firewall for a typical hosting server.
|
||||
---- Changes since 1.400 ----
|
||||
Show SNAT inputs in custom NAT chains.
|
||||
|
||||
@@ -162,7 +162,8 @@ if (($table->{'name'} eq 'nat' && $rule->{'chain'} ne 'POSTROUTING') &&
|
||||
"<input name=dpto size=6 value='$dpto'>"),"</td> </tr>\n";
|
||||
}
|
||||
|
||||
if (($table->{'name'} eq 'nat' && $rule->{'chain'} eq 'POSTROUTING') &&
|
||||
if (($table->{'name'} eq 'nat' && $rule->{'chain'} ne 'PREROUTING' &&
|
||||
$rule->{'chain'} ne 'OUTPUT') &&
|
||||
&can_jump("SNAT")) {
|
||||
if ($rule->{'j'}->[1] eq 'SNAT') {
|
||||
if ($rule->{'to-source'}->[1] =~
|
||||
|
||||
@@ -154,7 +154,7 @@ else {
|
||||
print "<table width=100%><tr>\n";
|
||||
print "<form action=index.cgi>\n";
|
||||
print "<td><input type=submit value='$text{'index_change'}'>\n";
|
||||
print "<select name=table>\n";
|
||||
print "<select name=table onChange='form.submit()'>\n";
|
||||
foreach $t (@tables) {
|
||||
if (&can_edit_table($t->{'name'})) {
|
||||
printf "<option value=%s %s>%s\n",
|
||||
|
||||
@@ -106,7 +106,8 @@ else {
|
||||
delete($rule->{'to-destination'});
|
||||
}
|
||||
}
|
||||
if ($table->{'name'} eq 'nat' && $rule->{'chain'} eq 'POSTROUTING') {
|
||||
if ($table->{'name'} eq 'nat' && $rule->{'chain'} ne 'PREROUTING' &&
|
||||
$rule->{'chain'} ne 'OUTPUT') {
|
||||
if ($rule->{'j'}->[1] eq 'SNAT' && !$in{'snatdef'}) {
|
||||
&check_ipaddress($in{'sipfrom'}) ||
|
||||
&error($text{'save_esipfrom'});
|
||||
|
||||
Reference in New Issue
Block a user