hi everyone
my rule ıs /sbin/iptables -A INPUT -p tcp --dport 111 -j DROP
and ı want to forbıd tıll the port no 800.and ı donw want to wirte ıt down one by one.
so ı want to make a loop that wıll change port adress(whıch ıs 111) add port num
so far ı trıed slıcıng and counter=0 and counter +1 ın the loop
ıt gave me error
algorıtm ı treıd ıs
for x in range(800):
for x in iptables:
counter +=x[39:4]
print counter
and ıt gıves me error normally
so how can ı make ıt happen
out put should be
/sbin/iptables -A INPUT -p tcp --dport 111 -j DROP
/sbin/iptables -A INPUT -p tcp --dport 112 -j DROP
/sbin/iptables -A INPUT -p tcp --dport 113 -j DROP
/sbin/iptables -A INPUT -p tcp --dport 114 -j DROP
and so on
thanks for your hep