Friday, November 15, 2024
Centos IPtables

blok IP with IPtables

Blok IP :

# iptables -A INPUT -s 65.55.44.100 -j DROP
# service iptables save

unblock :

# iptables -D INPUT -s xx.xxx.xx.xx -j DROP
# iptables -D INPUT -s 65.55.44.100 -j DROP
# service iptables save

cek config :

nano /etc/sysconfig/iptables

 

If you just want to block access to one port from an ip 65.55.44.100 to port 25 then type command:
# iptables -A INPUT -s 65.55.44.100 -p tcp --destination-port 25 -j DROP

(Visited 131 times, 1 visits today)
Baca Juga :  Cara Update Centos 8 untuk Pemula

Similar Posts