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:
- Allow a remote IP for incoming connection in UFW (Uncomplicated firewall)
- Edit a remote file with vim over SSH
- How to transfer your identity.pub to the remote machine’s authorized_keys?
- Convert IP address to HEX in Bash script
- Running a command on the remote server