####this is my sample code friends### sub swap { ($rule1,$rule2=@_; my $old_rule="iptables -A INPUT -s 0/0 -i eth0 -d 192.168.2.1 -p TCP -j ACCEPT"; $temp = $old_rule; my $new_str=iptables -D INPUT rule_no #now here we will add the desired rule number my $new_rule=iptables -I INPUT rulenumber-s 202.96.0.0/12 -j DROP $old_str=$new_str $new_str = $temp # if we have to swap rules we will simply delete the previous rule in the chain and add a new rule
-- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/