Wednesday, October 17, 2012

Linux IP Commands

Display Current Config for all NIC's: ifconfig

Display Current Config for eth0: ifconfig eth0

Assign IP: ifconfig eth0 192.168.1.2

Ping: ping -c 3 192.168.1.1

Assign multiple IP's: ifconfig eth0:0 192.168.1.2

Assign second IP: ifconfig eth0:1 192.168.1.3

Disable network card: ifconfig eth0 down

Enable network card: ifconfig eth0 up

View current routing table: route "or" route -n

View arp cache: arp "or" arp -n

Assign IP/Subnet: ifconfig eth0 192.168.1.2 netmask 255.255.255.0

Assign Default Gateway: route add default gw 192.168.1.1

Trace Route: traceroute www.whatismyip.com

Trace Path: tracepath www.whatismyip.com

DNS Test: host www.whatismyip.com

Advanced DNS Test: dig www.whatismyip.com

Reverse Lookup: host 66.11.119.69

Advanced Reverse Lookup: dig -x 66.11.119.69

*You MUST be at the ROOT user to make/save any changes. Linux users, your distribution will determine the location of your network config file which will need to be updated and saved in order for the changes to remain in effect after rebooting. Network cards are referred to as eth0, eth1, eth2, etc based on their position on the PCI bus.
*Special thanks to Gergely for the Linux commands!

How do I get the header to start the trace email process

Each electronic messaging program will vary as to how you get to the message options. I'll cover the basics to start the trace...the rest is up to you.
  • Outlook - Right click the message while it's in the inbox and choose Message Options. A window will open with the headers in the bottom of the window.
  • Windows Live - Right click the correspondence while it's in the inbox, choose Properties, then click the Details tab.
  • GMail - Open the correspondence. In the upper right corner of the email you'll see the word Reply with a little down arrow to the right. Click the down arrow and choose Show Original.
  • Hotmail - Right click the memo and choose View Message Source.
  • Yahoo! - Right click the note and choose View Full Headers.
  • AOL - Click Action and then View Message Source.
You can see that no matter the program, the headers are usually just a right click away.