3 # Save spoofing settings
5 require './itsecur-lib.pl';
6 &can_edit_error("spoof");
10 &error_setup($text{'spoof_err'});
12 $iface = $in{'iface'} || $in{'iface_other'};
13 $iface =~ /^[a-z0-9:\.]+$/ || &error($text{'nat_eiface'});
17 @nets = split(/\s+/, $in{'nets'});
19 $n =~ /^([0-9\.]+)\/(\d+)$/ &&
20 $2 >= 0 && $2 <= 32 &&
21 &check_ipaddress("$1") ||
22 &error(&text('spoof_enet', $n));
24 !$iface || @nets || &error($text{'spoof_enets'});
26 &save_spoof($iface, @nets);
27 &unlock_itsecur_files();
28 &remote_webmin_log("update", "spoof");