Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
hostname to IP
Results 1 to 10 of 10

Thread: hostname to IP

  1. #1

    hostname to IP

    I am trying to find the IP of a certain host. When I try and ping it, it refuses my pings. I have tried a few different options of nmap and they seem not to give me a reply. I know it is a Win 2K box but I am not sure what they have in front of it. I am not new at doing this but I feel like I am losing my touch. Can anyone suggest a way to get the IP addess out of a hostname? Thanks in advance.

  2. #2

    Re:hostname to IP

    Traceroute?

  3. #3
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re:hostname to IP

    dig and whois

  4. #4

    Re:hostname to IP

    [quote author=datamike link=board=1;threadid=5216;start=0#51287 date=1033767160]
    Can anyone suggest a way to get the IP addess out of a hostname? Thanks in advance.
    [/quote]

    Another easy way is do to:
    Code:
    nslookup <ipaddress>
    Admittedly nslookup is an older tool but its simplicity is useful sometimes. Keep in mind that a reverse dns entry has to exist for the ip address, otherwise the reverse lookup won't work. If the ip address is serviced by some other DNS server (ie, one that you aren't using as your default), you can change the server to point to the one the ip address is likely using. For instance, if you're trying to reverse lookup an ip address on AT&T's network, its often useful to change your server (via nslookup, or dig) to AT&T's DNS server.

    If there is no reverse dns entry in existance for that ip address, you're pretty much out of luck, I think. If the hostname is a netbios hostname (ie, windows) and not a DNS hostname, a "ping -a <ipaddress>" will also work, but that is using window's ping program, not linux's. (Linux's ping doesn't appear to have this functionality - ie its not netbios aware).

    Example of using nslookup in action:

    Code:
    [root@linuxhost /etc]# nslookup linuxhost.mydomain.cxm
    Server:  localhost
    Address:  127.0.0.1
    
    Name:    linuxhost.mydomain.cxm
    Address:  192.168.102.3
    
    [root@linuxhost /etc]# nslookup 192.168.102.3
    Server:  localhost
    Address:  127.0.0.1
    
    Name:    linuxhost.mydomain.cxm
    Address:  192.168.102.3
    (Reference: http://www.troubleshooters.com/linux/dns.htm)

  5. #5
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re:hostname to IP

    Code:
    [aschott@system11 aschott]$ dig linuxjunior.org
    
    ; <<>> DiG 9.2.1 <<>> linuxjunior.org
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64724
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
    
    ;; QUESTION SECTION:
    ;linuxjunior.org.               IN      A
    
    ;; ANSWER SECTION:
    linuxjunior.org.        86400   IN      A       64.71.178.180
    
    ;; AUTHORITY SECTION:
    linuxjunior.org.        86400   IN      NS      ns1.phpwebhosting.com.
    linuxjunior.org.        86400   IN      NS      ns2.phpwebhosting.com.
    
    ;; ADDITIONAL SECTION:
    ns1.phpwebhosting.com.  86400   IN      A       64.65.1.112
    ns2.phpwebhosting.com.  86400   IN      A       64.65.34.231
    
    ;; Query time: 238 msec
    ;; SERVER: 206.141.251.2#53(206.141.251.2)
    ;; WHEN: Thu Oct 10 12:41:35 2002
    ;; MSG SIZE  rcvd: 134
    Code:
    [aschott@system11 aschott]$ host linuxjunior.org
    linuxjunior.org has address 64.71.178.180
    Code:
    [aschott@system11 aschott]$ dig 64.71.178.180
    
    ; <<>> DiG 9.2.1 <<>> 64.71.178.180
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 488
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;64.71.178.180.                 IN      A
    
    ;; AUTHORITY SECTION:
    .                       86400   IN      SOA     A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2002101000 1800 900 604800 86400
    
    ;; Query time: 500 msec
    ;; SERVER: 206.141.251.2#53(206.141.251.2)
    ;; WHEN: Thu Oct 10 12:42:09 2002
    ;; MSG SIZE  rcvd: 106
    
    [aschott@system11 aschott]$
    These are what RedHat has reccommended I use since 7.0/7.1 at least. So per their request I have made a habit. It gives me results. I am curious though, if there are any other tools that do more (if any more can be given)

  6. #6
    Senior Member
    Join Date
    May 2001
    Posts
    472

    Re:hostname to IP

    If you like this kinda stuff, check out nmap and nmapfe.

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

    Re:hostname to IP

    [quote author=datamike link=board=1;threadid=5216;start=0#51287 date=1033767160]
    When I try and ping it, it refuses my pings.[/quote]
    The host must be running Firewall. I've seen those behavior in hosts with either BlackIce or ZoneAlarm. ZoneAlarm will disable ICMP messages by default.
    I have tried a few different options of nmap and they seem not to give me a reply.
    Try with -O option ( Dash Capital Oh ). "man nmap will reveal losts of options you can do ...

  8. #8

    Re:hostname to IP

    If it is behind a firewall not exposing any public services, then most likely it is not registered in a public dns namespace. If it is publically accessable, then just run a dig as everyone else stated. Most corps will discard all inbound ICMP traffic at the firewall. That's very common.

  9. #9

    Re:hostname to IP

    ; <<>> DiG 9.1.3 <<>> sitename.com
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34772
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;sitename.com. IN A

    ;; AUTHORITY SECTION:
    softscape.com. 1292400 IN SOA primedns.sitename.com. postmaster.sitename.com. 2002080205 1800 600 1209600 86400

    ;; Query time: 191 msec
    ;; SERVER: 205.171.3.65#53(205.171.3.65)
    ;; WHEN: Thu Oct 17 17:09:14 2002
    ;; MSG SIZE rcvd: 87


    What do you think this means then?

  10. #10
    Quote Originally Posted by datamike View Post
    I am trying to find the IP of a certain host. When I try and ping it, it refuses my pings. I have tried a few different options of nmap and they seem not to give me a reply. I know it is a Win 2K box but I am not sure what they have in front of it. I am not new at doing this but I feel like I am losing my touch. Can anyone suggest a way to get the IP addess out of a hostname? Thanks in advance.
    To find ip address of certain host name visit Whoisxy.com .Here they provide the domain to ip service using that you can find the ip address of a domain name. They also provide ping test services using which you can test the ping of that website. If it refuses to do ping for that site then it mean there was a problem in that site. You can tell about the problem to the owner of the website. If you don't know any information about that website owner then do whois search in the above site which i mentioned here. By whois search you can get details like domain owner information,contact details, email id etc. of that website using this details you can contact the owner.

Similar Threads

  1. Hostname idea
    By mcdougrs in forum Linux - Hardware, Networking & Security
    Replies: 5
    Last Post: 12-15-2002, 08:41 PM
  2. DHCP and Hostname help
    By mcdougrs in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 11-07-2002, 10:00 AM
  3. hostname of a pc
    By kemu in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 10-02-2002, 11:56 PM
  4. hostname in iptables?
    By tolstoy in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 01-17-2002, 10:02 PM
  5. Hostname
    By Schotty in forum Linux - Hardware, Networking & Security
    Replies: 10
    Last Post: 12-05-2001, 02:34 PM

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
  •