How to get all subnet's of an ISP?


Results 1 to 8 of 8

Thread: How to get all subnet's of an ISP?

  1. #1
    Join Date
    Jul 2002
    Location
    Bled, Slovenia
    Posts
    63

    Question How to get all subnet's of an ISP?

    I would like to block some ports (like ssh - 22) for all IP's that don't come from some local ISP networks.

    Now I have a problem how to get all ISP's subnetworks? I have some out-dated list of subnetworks, but I would like to update them autmatically.

    That should be done someway with 'whois' or 'dig' utility.
    I can't find anything useful on internet or ripe.net site (which is quite confusing).

    Has anyone already done that?

  2. #2
    Join Date
    Oct 2000
    Location
    Calgary, Alberta, Canada
    Posts
    8,116
    the normal way to do this is to block everything _except_ the ones you want to allow.

  3. #3
    Join Date
    Jul 2002
    Location
    Bled, Slovenia
    Posts
    63
    Hayl: I know how should I block.

    The problem is what are all the subnets of some certain ISP.
    I would like to block certain ports to some local ISP around my server. Beacuse some of these ISPs are quite small and their subnets get changed over time (changed completly or new added), would be nice if I could update those IP subnets automatically with some scripts.
    I am able to search for those subnets at ripe.net whois database on their website, but I don't know how to retrieve that numbers automatically.

    Clear enough what I want?

  4. #4
    Join Date
    Oct 2002
    Location
    Kaiserslautern, Germany
    Posts
    77
    Did you try asking the ISP(s) for a list? If you explain what your trying to do, maybe since they are smaller ISPs they wouldn't mind as much giving you a list of subnets or ip ranges.
    Linux Registered User #338570
    Ubuntu -- Server

  5. #5
    Join Date
    Sep 2004
    Location
    /home/
    Posts
    1,204
    So your ISP serves 40,000 people you are opening up your port 22 to 40,000 users. If you are going to do that, you might as well have it open it to 400,000. Also if you want to access your pc from a computer from another ISP (which happens a lot) you couldn't.

    Hayl's way is the common way because its secure, only allows IPs you want, and works from anywhere.

    you could have a script on remote machine that gets IP address and sends it to your PC, then you could update that way. But no reason to open it to all subnets.

    soule
    Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others. - Edward Abbey

    IRC #linuxn00b

    Support your Distro.
    Slackware Store
    Archlinux Schwag

  6. #6
    Join Date
    Mar 2001
    Location
    In the 3 world of MT
    Posts
    36
    Maybe his is trying to thwart a certain cracker on who uses a certain ISP and uses dynamic addressing.

    This could be intersesting.. C'mon guys lets get creative!

    Thanks

    dan
    Give a man a fish and he will eat for a day, teach a man to fish and he will stay drunk in a boat the rest of his life.

    ---Paul Harvey

  7. #7
    Join Date
    Jun 2002
    Location
    Jamaica Plain, MA
    Posts
    458
    what about a script that looks for failed ssh attempts and then blocks those IPs, if not forever, at least for a short time.

    I use a simular script for black listing cmd.exe attacks on my box. I have the PHP script grab the source IP and then adds that ip to the iptables rule. It seems to cut down on the code-red and windows buffer overflow attempts I get.

    hope that idea helps.

  8. #8
    Join Date
    Sep 2002
    Location
    San Antonio, TX
    Posts
    2,607
    http://www.whois.sc/

    Enter any IP address owned of the ISP, will show the block owned by them.

    hlrguy
    Were you a Windows expert the VERY first time you looked at a computer with Windows, or did it take a little time.....
    My Linux Blog
    Linux Native Replacements for Windows Programs
    Mandriva One on a "Vista Home Barely" T3640 E-Machine runs great.

Posting Permissions

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