Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Aug 2003
    Posts
    77

    Default Banning hostnames.

    how do you ban hostnames via iptables? Ips are something else but hostnames, not sure how.

  2. #2
    Member
    Join Date
    Feb 2004
    Posts
    204

    Thumbs up

    Hi jmweb,

    You can give domain name instead of ip , but it will be resolved when you add it (so it's exactly the same as adding the address it points to). the command is:

    iptables -I INPUT -s domain name -j DROP

    But if a single IP is shared by more than host then it is not possible with iptables.

    Alternative for this is :

    You can block any hostname with a deny from in .htaccess or the virtualhost directive if you wish.

    Regards,

    Bright

Similar Threads & Tags
Similar threads

  1. IP Banning
    By AR15Armory in forum New User Questions
    Replies: 3
    Last Post: 09-06-2009, 10:55 AM
  2. banning ip, getting error
    By topgunmike in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 02-15-2009, 03:22 PM
  3. Banning an IP
    By Chriz1977 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 10-16-2006, 07:49 AM
  4. Mysql banning ip's?
    By BlackDemon in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-08-2006, 09:38 AM
  5. hostnames
    By rnxalec in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-28-2002, 09:43 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube