How to check if an IP is blocked in IPTABLES

Discussions related with hosting control panels used, which include cPanel, Plesk, Directadmin etc..

Moderator: Staff

Post Reply
Jackk
Posts: 0
Joined: Fri Apr 13, 2018 7:18 pm

How to check if an IP is blocked in IPTABLES

Post by Jackk »

Hello,

How to check if an IP is blocked in IPTABLES?


Tommy
Posts: 0
Joined: Wed Sep 09, 2020 12:10 pm

Re: How to check if an IP is blocked in IPTABLES

Post by Tommy »

Hello Jackk,

You can check below command to verify your IP is blocked or not in IPTABLES

iptables -L -n --line | grep [IP Address]


if IP appears as DROP or REJECT, the IP has been blocked


also you can use the below command to unblock IP


iptables -I INPUT -s [IP Address] -j ACCEPT


Jackk
Posts: 0
Joined: Fri Apr 13, 2018 7:18 pm

Re: How to check if an IP is blocked in IPTABLES

Post by Jackk »

Hello Tommy,

Thank you for your reply.

can you please let me know also how to block IP manually using IPTABLES?


Tommy
Posts: 0
Joined: Wed Sep 09, 2020 12:10 pm

Re: How to check if an IP is blocked in IPTABLES

Post by Tommy »

Hello Jackk,


Please use the below command to blocking back an IP address in IPTABLES


iptables -A INPUT -d [IP Address] -j DROP


If you are looking for assistance in server management, please get in touch with our support.
Post Reply