Results 1 to 10 of 10

Thread: Blocking an IP address

  1. #1
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Blocking an IP address

    My server is getting scanned from a particular IP address on a regular basis. What would be the simplest way for me to completely block this IP address from my box?

  2. #2

    Re: Blocking an IP address

    IPTABLES -A INPUT-p all -s <ip adress> -j drop
    ... but im not really sure thats just from memory

  3. #3
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Re: Blocking an IP address

    Thanks ch-b. When I try to run iptables, I get this error:
    /lib/modules/2.4.16/kernel/net/ipv4/netfilter/ip_tables.o: init_module: Device or resource busy
    Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters
    /lib/modules/2.4.16/kernel/net/ipv4/netfilter/ip_tables.o: insmod /lib/modules/2.4.16/kernel/net/ipv4/netfilter/ip_tables.o failed
    /lib/modules/2.4.16/kernel/net/ipv4/netfilter/ip_tables.o: insmod ip_tables failed
    How can ip_tables be busy? How can I make it "unbusy"?

  4. #4

    Re: Blocking an IP address

    Maybe you already insterted it, i never used iptables with modules always compiled it into the kernel .. so i cant help you there ..
    But very strange that iptables is busy ..

  5. #5

    Re: Blocking an IP address

    Are you running this as root?

  6. #6
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re: Blocking an IP address

    May be /etc/host.deny ??

  7. #7
    Mentor
    Join Date
    May 2001
    Location
    New Jersey
    Posts
    1,473

    Re: Blocking an IP address


    May be /etc/host.deny ??
    Yea cant you just put the ip in that file?

    Worked for me! :-/

  8. #8

    Re: Blocking an IP address

    host.deny will only do inetd


    umm cloverm do you have the ipchains or ipfwadminorwhatevertheycalledit module loaded? lsmod

    if you have ipchans of ipfw it wont let you use iptables, only one at a time.

    the ipchains version is ipchains -a input -s foo -j deny i think

  9. #9

    Re: Blocking an IP address

    I've done a little digging, and all I can find are people suggesting rmmod iptables and reinstalling it.

    Seems a little drastic, but if you can't find anything else to try it might be worth a shot.

    HTH

  10. #10
    Guest

    Re: Blocking an IP address

    Code:
    block in quick log on $ExtIf from $Stupid_IP to any
    pf rules!

Similar Threads

  1. How to Achive IP address through MAC(Ethernet) address
    By krishnacins in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 10-03-2005, 02:17 PM
  2. Blocking webservers
    By Lunke in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 08-10-2004, 02:27 AM
  3. Blocking pop-ups? You're a thief!
    By cloverm in forum General Chat
    Replies: 18
    Last Post: 12-05-2002, 02:39 AM
  4. Q for Sys admins: Blocking P2P
    By Blaqb0x in forum Linux - Hardware, Networking & Security
    Replies: 14
    Last Post: 10-17-2002, 06:39 PM
  5. firewall blocking 68.*.*.* and 67.*.*.*
    By gjansky in forum Linux - Software, Applications & Programming
    Replies: 3
    Last Post: 03-08-2002, 10:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •