Block a remote IP Address using iptables
Ban a remote IP Address using iptables
Answer:
iptables -A INPUT -s IP -j DROP
Replace IP with the actual remote IP address.
Note that the blocking will be lost when server reboot. You would need to save the rule(s) into a script and reload when server reboot.
Related posts:
- How to transfer your identity.pub to the remote machine’s authorized_keys?
- Running a command on the remote server
- Copy file to remote server using scp
- Convert IP address to HEX in Bash script
- How to mount a NFS share?
Post a Comment