To list all files in current directory including dot files (hidden files or directories), as well as print permissions :
ls -laBlock an IP with iptables
-
Block an IP address:
iptables -A INPUT -s IP-ADDRESS -j DROP
Replace ‘xx.xx.xx.xx’ with the IP address:
iptables -A INPUT -s xxx.xxx.xxx.xxx -j DROP
If you need to block port access from an ip xx.xx.xx.xx to port 22:
iptables -A INPUT -s xx.xx.xx.xx -p tcp --destination-port 22 -j DROP
The above rule will drop all packets coming from IP xx.xx.xx.xx to port 22:
CentOS / RHEL / Fedora Block An IP And Save It To Config File
Type the following two command:
iptables -A INPUT -s xx.xxx.xx.xxx -j DROP
If this is permanent:
service iptables save
Unblock An IP with iptables:
Where ‘-D’ flag = delete:
iptables -D INPUT -s xx.xxx.xx.xx -j DROP
Then to permanently save the changes to be implemented on reboot:
service iptables save
-