BASH Networking

BLINK LIGHTS ON NETWORK CARD
Terminal:~$ ethtool -p eth0 10

This will blink the lights for 10 seconds. However if you get this message...

Cannot identify NIC: Operation not supported

...you are out of luck because it only works with some chipsets and drivers:-

"-p initiates adapter-specific action intended to enable an operator to easily identify the adapter by sight. Typically this involves blinking one or more LEDs on the specific ethernet port."

ewrk3 s2io sky2 tg3 e100 pcnet32 bnx2 skge e1000 sk98lin ixgb

Thanks to Redhat, Linux Journal & Linux Toolkit.

DETECT IP ADDRESS CONFLICTS
Install the relevant software, for Debian/Ubuntu:

Terminal:~$ sudo apt-get install arp-scan

For CentOS, Fedora or Redhat:

Terminal:~$ sudo yum install arp-scan

Once installed to use:

Terminal:~$ sudo arp-scan -I eth0 -l

This should return something similar to: Terminal:~$ Interface: eth0, datalink type: EN10MB (Ethernet) Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/) 192.168.0.1	1c:c1:de:1c:74:8f	Hewlett Packard 192.168.0.21	00:1b:a9:8a:52:d2	BROTHER INDUSTRIES, LTD. 192.168.0.41	f4:ec:38:a8:d0:de	TP-LINK TECHNOLOGIES CO., LTD. 192.168.0.52	00:1d:fe:df:2c:53	Palm, Inc 192.168.0.86	00:1d:fe:e9:1a:ca	Palm, Inc

USE CONNTRACK TO BLOCK AN IP ADDRESS
conntrack -L -s {IP-ADDRESS} conntrack -D -s {IP-ADDRESS}