Wednesday, April 3, 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 112 times, 1 visits today)
Baca Juga :  Cara Install Nextcloud Server di CentOS 7

Similar Posts