Posts

Showing posts with the label ipaddress

Open for business?

Image
This is two scripts one to find and record machines on the system at the time and the second script is to find open ports on those systems below 1024. alive.sh [code] #!/bin/bash rm /tmp/goodips is_alive_ping() {   ping -c 1 $1 > /dev/null   [ $? -eq 0 ] && echo $i >> /tmp/goodips } for i in 192.168.1.{1..255} do is_alive_ping $i & disown done [/code] /tmp/goodips 192.168.1.1 192.168.1.2 192.168.1.3 192.168.1.4 Now the second script. scannet.sh [code] datafile="/tmp/goodips" a=1 m="not done" while read line do fdata[$a]=$line echo echo $line        let a=a+1        for p in {1..1023};        do        (echo >/dev/tcp/$line/$p) >/dev/null 2>&1 && echo "$p open"        done done < $datafile [/code] results: 192.168.1.1 23 open 53 open ...

No connection?

Image
At a place where I used to work, one of my duties was to see that client testing software worked with the local systems. Most of the time this was no big deal. But this one day the client software (which always word before) did not connect to the host's server. Student could not take their exams.  Everyone seemed perplexed as allegedly everything was set up right. One tool you can test a connection is traceroute. Not only can you test the connection, but you can find some interesting information about the connection. Having done that, became disappointed when we could not get the traceroute to work, Then I thought it could be an internet problem. There are sites that will let you run traceroute externally from your your network. Used the internet to find such a site. There are many. So the plan was to first test a site near the source to see if the connections there were foobarred. Then we tried doing the same thing to the destination site, All was fine. Still perplexed, W...

Multiple nics.

Image
What can you do with multiple nics? Several things see http://www.instructables.com/id/Multiple-network-cards/ for more details.

Are you static or dynamic? (phone book part II)

Image
Or should I say is your computer's ipaddress static or dynamic. Static means it is hard coded in the system files on a system. Dynamic means you get the ipaddress for a dhcp (dynamic host configuration protocol)  server or the like and it could change at any time. We said in the last article that all computing devices (assuming they are connected to a network) have an internet telephone number or ipaddress. What I did not discuss was how you get that address. To make things more interesting your router actually has two or more ipaddresses. One is for the internet which is usually dynamic unless you have paid for a static ipaddress through your internet provider and one is for being the gateway (where to point to for accessing the internet) for your local area network is static.  To make things easier, I will only talk about ipaddressing withing a local area network for now. Your local router usually comes with a standard ipaddress for the local network. You can change it, but ...

Your local network telephone book.

Image
We need a way to know what device (i.e. computer) is what and or who. That is why we need an internet telephone book. The internet is in some ways still is like a telephone network. You can key in the phone number of someone to call or you can use the phone book to look up their phone number. The internet is sort of the same, but now the directory assistance is built in so to speak. The internet uses an internet protocol address instead of a phone number, to identify which computer is which, The Google internet protocol address is: 173.194.64.106 in this case. Computer directory assistance: $ nslookup www.google.com Server:        x.x.x.1 Address:    x.x.x.1#xx Non-authoritative answer: www.google.com    canonical name = www.l.google.com. Name:    www.l.google.com Address: 173.194.64.147 Name:    www.l.google.com Address: 173.194.64.105 Name:    www.l.google.com...