Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
User Journal

Journal FortKnox's Journal: Serious Sysadmin Help Needed 38

OK, I have a delimma. My Linux box's keyboard port doesn't work. This isn't a problem, cause I'll just ssh in if I need something.

Well, power went out and roadrunner decided to flip the IP around. Now I have no idea what my new IP is.

Here's the layout. I have a cablemodem which is being put into a hub. From the hub I have my linux box attached and a router attached. On the other side of the router is my two windows machines (only allowed 2 IPs, so my windows boxes share the router's IP). Any clue as to how I can figure out the new IP of my linux box without actually touching the box itself?

Heh... I even have an older box that -can- take the place of the linux box, but haven't set it up with all the stuff it needs.... Looks like I better get it ready....
This discussion has been archived. No new comments can be posted.

Serious Sysadmin Help Needed

Comments Filter:
  • does it have a USB port? You could use a USB keyboard.

    also, could you use tracert from the windows box to see the ip of the linux box?

    • Damn, beat me to it.

      tracert: Old DOS hacker trick. Love that utility. Also useful for figuring out why your nice LPB status suddenly went to 800ms.

  • Try this:

    1) Remove line from hub to cable modem.
    2) ping 255.255.255.255, or alternaltively, the broadcast address assigned to your router.
    3) Both the Linux box and the router should respond - take the address that is NOT the router.

    However, I would ask why you don't either a) find out why the keyboard does not work or b) plug a USB keyboard in.
  • Use a serial connection. Bam, you are in.

    You do have a serial cable and null modem adapter don't you?
  • Do you know what IP range and subnet your cable IP is on? I would think so, since it's likely to be somewhere around the same range as the router attached to your windoze boxes.
    nmap -p0 -O <network>|grep Linux
    There aren't likely to be very many Linux boxes on your cable block, so you should have some degree of success, but the scan takes a while. As a fringe-benefit, you could also find some unsecured Linux boxes :)
  • by ryanr ( 30917 ) *
    You could scan your subnet for SSH ports. Do you know the MAC address of the NIC in the Linux box? WOuld it be initiating any connections out, such that you could sniff for traffic coming from it?

    Oh... I know. Just sniff all traffic onthe hub. Any traffic that isn't going to your router is goingto your Linux box. The cable modem providers usually don't send traffic down your line unless it's for one of your IPs.
    • How do I scan my subnet for ssh ports? Is there a program to do that? By subnet, do you mean the IP xxx.xxx.xxx.[1-255]??

      How do I sniff packets?
      • Your subnet is often x.y.z.0-255, though not always. It depends on your subnet mask. There's also no guarantee that the other box is in the same logical subnet. The usual choice for scanning is nmap.

        There are a number of sniffer programs. My favorite is Ethereal. www.ethereal.com [ethereal.com]
  • Try this:

    1. Remove line from hub to cable modem.
    2. ping 255.255.255.255, or alternaltively, the broadcast address assigned to your router.
    3. Both the Linux box and the router should respond - take the address that is NOT the router.

    Only one problem with that scenario. Most OSes & network appliances no longer reply to ICMP echos over the network broadcast address due to the possibility of smurf attacks. A recent cisco router will not respond to a ICMP echo over broadcast (they aren't supposed to at least

    • I'm with this. Pulling the IP & Subnet off your router should give you a pretty good idea of your available IP space. If it's small, a few quick tests should do it. If it's large, just unplug the cable modem after you download a ping scanner [google.com] and have at it.
    • You know what your router address is and your subnetmask is (yes?) then you can calculate the other IPs in the subnet.

      Although I'm a webcoder, I'm very light in the hardware know-how. How do I calculate the IPs in my subnet?
      • YOu don't need too, just do a broadcast ping or a ping scan with the cable modem disconnected (so that the only thing that can respond is your windows and your linux PC.

        If you still want to figure out how many _POSSIBLE_ IP's are in your subnet, take the last octet from your subnet mask subrat it from 255 and subtract 1 more. For example, lets pretend the netmask is 240, subracted from 255 is 15 subtract 1 more is 14 available hosts. I imagine you will have a lot of potential hosts. The only way to know
        • YOu don't need too, just do a broadcast ping or a ping scan with the cable modem disconnected (so that the only thing that can respond is your windows and your linux PC.

          Except that modern OSes & network appliances won't respond to a ICMP echo request directed at the broadcast address, due to the fact that it opens the door for smurf attacks.

          If you still want to figure out how many _POSSIBLE_ IP's are in your subnet, take the last octet from your subnet mask subrat it from 255 and subtract 1 more. F

      • The other relatively easy way to do it is use Piotr Klaban's IPv4 Network Calculator [torun.pl]

        Find the class of your address by looking up in which range it falls in the table (top left). Put the subnet mask in the bottom section, and the top right section will tell you the number of IP addresses you've been allowed.

  • use the mouse. you can cut and paste single characters from other things on the screen to spell out "ifconfig" and that'll give you the current address.

    -Ab
    • need to log in first... don't have any words available to log in, though :-(
      • Is it your server? If so, boot it up, then move the ethernet cable from the hub to the router. Then chck your router logs (or run a packet snooper from your windows boxen) to find it's NTP packets. That'll tell you the source IP of the linux box.

        -Ab
        • uuuuhhhhhh.... please keep in mind... software programmer, not admin. I know what you said, I just don't know how to do it. Well, packet sniffing is the big thing... what program do you use to do it? What are NTP packets?
          • Packet sniffing: use ethereal. here is a good crash course in packet sniffing and how-to: link [surasoft.com]
            Link to ethereal is in the article.

            NTP: network timing protocol. It's the protocol that keeps your computer clock from gaining or lossing time. Every so often (depending on settings, usually twice a day) it sends out a ping request to a time server. The server sends back the time and your machine sets it self to thaata time (with adjustments for the ping packet travel time).

            yet another way would be to hack y
            • I got the old IP, and the current IP of my router (along with the subnet mask). I'll hook you up with an IM later tonight (8ish ok with you?). If not, I'll hook you up with an email later tonight when I have the info available in front of me.
              • Hey, tell me if I'm right ...

                Your current router IP is 24.209.202.243
                Your Linux box is 24.209.202.51

                Just curious to see if my skillz are sstill 133t :)

                -Ab
                • from what I remember from last night, you aren't right on the router, but are close. The Linux box I'm pretty sure is wrong. Out of all the ips, only one had a ssh login, and it wasn't mine (well, it wasn't accepting my password if it was).
  • on your windows box, (providing it is on the same subnet) run arp -s 192.168.1.x then just ssh to that arbitary ip. should work I use it to find naughty windows servers all the time.
  • and we were all thinking it...

    this time give the Linux box a fixed IP....

    oh or replace it with an XServe
  • You could hook one of the Win boxs directly to the hub, run ethereal [ethereal.com] and look for the ARP packets [from the GNU/Linux box].
  • Keyboard? how quaint! Use voice commands. :-)
  • Have you gotten it? What worked? We're all curious.
    Okay, at least *I* am.

    I really had to laugh at Abm0raz's idea with the mouse. Heh. I've done that. What a pain in the ASS. But it works. I had my two best desktop boxen die last month, and one of them lost both PS/2 ports. Want me to email you my USB keyboard?

    Incidentally, this is one reason I generally leave root logged in on a tty on each *nix box at home. Another is if I'm MIA during extended power outage, I can guide the little lady throug

    • A lot of people misunderstood what I said. The linux server isn't plugged into the router, its plugged into the hub (the router is also on the hub, and is in front of my windows boxes).

      No, I tried a buncha options. When I unplug my cablemodem, nothing seems to respond, though I don't know how to 'broadcast a ping' across the network.

      Musta gotten lost in the admin jargon (as I said, I'm a software developer, not an admin).

      So any more help is much appreciated :-)
      • Don't worry about the broadcast ping. It was a good idea, but in recent years, it doesn't work very often, because few machines reply to them.

        I'm hoping this is accurate:

        net
        |
        cable modem
        |
        hub
        | |_______Linux
        |
        router
        | |_______win2
        |
        win1

        Jeez, this is annoying when they still remove spaces for you.

        The only idea I've got would be to ping addresses close to the address assigned to the router and hope you have an address that's on the same subnet.

        The ping utility Penguin Follower mentioned above worked well fo

  • Okay, so here's what you do.
    Method 1:

    1) Take one of your Windows boxes off of the LAN.
    2) Give it an IP of 192.168.123.1
    3) Take down your Linux box and open it up.
    4) Read the MAC address off of the NIC, if you don't already know it. That's a set of 12 hexadecimal digits.
    5) Boot it back up, still on your ISP's connection.
    6) Once it's online, plug it into a hub with the previously selected Windows box, and run the following command from Windows:

    arp -s 192.168.123.2 [insert Linux MAC address here]

    ssh into 1
  • and shortcut all this technobabble-mumbo-jumbo part swapping =)

An Ada exception is when a routine gets in trouble and says 'Beam me up, Scotty'.

Working...