Monday, May 20, 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 117 times, 1 visits today)
Baca Juga :  Jenkins error - Starting Jenkins /etc/rc.d/init.d/jenkins: line 115: img-src: command not found

Similar Posts