How to view network traffic to find a certain person that is hogging bandwidth.

To view network traffic and then locate certain traffic that is hogging bandwidth, use the iftop utility. This is a great way to see what is going on in your network. Just install iftop. jason@Yog-Sothoth » ~ » $ sudo apt install iftop Then run it with this one-liner. jason@Yog-Sothoth » ~ » $ sudo … Read more

Another way to get the actual IP address of your machine.

This is yet another way to get the actual IP address of your Linux machine on a LAN. This returns just the IP address of your Linux computer. jason@jason-Lenovo-H50-55:~$ ip a | awk ‘/inet / { print $2 }’ | sed -n 2p 192.168.1.4/24jason@jason-Lenovo-H50-55:~$ ip a | awk ‘/inet / { print $2 }’ | … Read more

Simple Linux commands to get information from your system.

Get your Internet routable IP address with the command line. [jason@localhost ~]$ curl ‘https://api.ipify.org’ ; echo[jason@localhost ~]$ curl ‘https://api.ipify.org’ ; echo Get the startup time of your Linux PC with Systemd. [jason@localhost ~]$ systemd-analyze Startup finished in 1.186s (kernel) + 9.653s (initrd) + 2min 37.144s (userspace) = 2min 47.984s[jason@localhost ~]$ systemd-analyze Startup finished in 1.186s … Read more

How to get just the IP address of your Linux machine using curl.

To get just the IP address of your Internet facing Linux machine, use this command. jason@jason-desktop:~/Documents/ipinfo/src$ curl icanhazip.comjason@jason-desktop:~/Documents/ipinfo/src$ curl icanhazip.com This will return just your IP address. This is another way to get this information. jason@jason-desktop:~/Documents$ curl ipinfo.io/ipjason@jason-desktop:~/Documents$ curl ipinfo.io/ip To get information about a DNS server, use the dig command. jason@jason-desktop:~/Documents/ipinfo/src$ dig 8.8.8.8   … Read more

Use the ip route command to create an ip route manually on Linux.

This command will add an IP route to the 172.29.59.1 router using the wlan0 wireless interface card on my laptop. jason@darknet:~$ sudo ip route add 0/0 via 172.29.59.1 dev wlan0jason@darknet:~$ sudo ip route add 0/0 via 172.29.59.1 dev wlan0 This is part of the process of creating a network connection from your machine to a … Read more

How to find out the gateway IP address of your Linux machine on a LAN.

This is how you find out the gateway IP address of your Linux machine on a LAN. I have executed the route -n command and I have this output. The UG flags on the IP address denote it as a gateway IP address. root@darknet:~# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric … Read more

How to use the ip command to bring down an interface on RHEL.

The ip command is a useful alternative to the ifconfig command and allows the user to manage network interfaces. This is a good way to use the command line to bring network interfaces up or down. In this example I am bringing the network interface down. [root@localhost jason]# ip link set eno16777736 down [root@localhost jason]# … Read more

More commands to get information about your network adapter.

There are a few commands available in Red Hat Linux to get information about your network adapter. Here are a couple. The ifstat command returns information about the network throughput of your adapter. [jason@darknet ~]$ ifstat #kernel Interface RX Pkts/Rate TX Pkts/Rate RX Data/Rate TX Data/Rate RX Errs/Drop TX Errs/Drop RX Over/Rate TX Coll/Rate lo … Read more

How to set an IP address for a VLAN on a Cisco 2960G switch.

To set an IP address on a VLAN on a Cisco switch, firstly access the configuration section for the VLAN in configuration mode. arya(config)#interface vlan 1arya(config)#interface vlan 1 Then the administrator may set an IP address for the VLAN. arya(config-if)#ip address 172.18.31.210 255.255.255.0arya(config-if)#ip address 172.18.31.210 255.255.255.0 Then you are all set. To save the running … Read more

How to scan a network for responsive hosts using Kali Linux.

To scan a network for hosts using Kali Linux, the netdiscover command will come in handy. Just give it an IP address and it will find all hosts within that range. I am scanning for all hosts within the range of 172.29.59.1 to 172.29.59.254. root@kali:~/Documents# netdiscover -r 172.29.59.0/24   Currently scanning: Finished! | Screen View: … Read more

Get the internet facing IP address of a Linux machine easily.

This simple command will print out the Internet facing IP address of a Linux machine in no time. curl ifconfig.me/ipcurl ifconfig.me/ip This will return the useragent that is used to access this URL. ubuntu ~ $ curl ifconfig.me/ua curl/7.35.0ubuntu ~ $ curl ifconfig.me/ua curl/7.35.0 Use this string to get all information about the host that … Read more

Get information about your network connection with Linux.

This command will return only the IP address of the host. ubuntu ~ $ hostname -i 172.31.20.16ubuntu ~ $ hostname -i 172.31.20.16 Querying for all local IP addresses on the host. ubuntu ~ $ hostname -I 172.31.20.16 10.8.0.1ubuntu ~ $ hostname -I 172.31.20.16 10.8.0.1 This simple script will ping Google and will check the return … Read more

Adding an IP address to the management interface for a Cisco switch.

Adding an IP address to the management interface of a Cisco switch allows connection over an Ethernet connection to manage the switch configuration. Firstly, switch to privileged exec mode. tyrion>en tyrion#tyrion>en tyrion# Then enter the configure terminal command to configure terminal settings. tyrion#configure terminaltyrion#configure terminal Now we are configuring settings for vlan 99. tyrion(config)#interface vlan … Read more

List all of your IP addresses using the ip command.

The ip command will list all of your ip addresses when combined with the grep command to look for all inet words. This is a very useful one-liner. ubuntu ~/Documents $ ip a | grep "inet " inet 127.0.0.1/8 scope host lo inet 172.31.20.16/20 brd 172.31.31.255 scope global eth0 inet 10.8.0.1 peer 10.8.0.2/32 scope global … Read more

Another way to get the IP address of your machine with the arp command.

This command will lookup the network adapter that you are using and return the gateway IP address. jason@eyjafjallajkull:~$ arp -n | grep : | awk ‘{print $1}’ 10.10.0.1jason@eyjafjallajkull:~$ arp -n | grep : | awk ‘{print $1}’ 10.10.0.1 This looks for the : character that is in the MAC address like this. jason@Yog-Sothoth:~$ arp -n … Read more

Information about satellite packet routing as it relates to the Internet.

This paper I found, PDF relates to the routing of network packets through a satellite connection. This might be very interesting to a student of networking who is interested in satellite networking and the unavoidable latency issues that come with such a connection. With a 250ms latency, this would add on to any existing latency … Read more

How to perform a scan with nmap and some useful nmap tips for probing a computer.

To send a SYN packet to a computer on a network, use this command. nmap -sS -v 192.168.1.10nmap -sS -v 192.168.1.10 If you want to send SYN packets to a range of IP addresses, this is the command to use. nmap -sS -v 192.168.1.10-100nmap -sS -v 192.168.1.10-100 This will send SYN packets to the IP … Read more

Some very useful networking tricks for Linux/UNIX users.

Get your gateway IP address with curl on the command line. [homer@localhost ~]$ echo $(curl -# http://ipecho.net/plain) ######################################################################## 100.0% 153.107.97.164[homer@localhost ~]$ echo $(curl -# http://ipecho.net/plain) ######################################################################## 100.0% 153.107.97.164 Another way to list the IP addresses of your network interfaces. Using the ip command. [homer@localhost ~]$ ip a | grep inet* inet 127.0.0.1/8 scope host lo … Read more