Thursday, December 17, 2009

Ifconfig and iftop and etherape network monitors

ifconfig (type in terminal) gives you good info on your network connections.
A nice terminal program is iftop. Etherape is a very informative gui program.

ifconfig

The Unix command ifconfig can function as a tool to configure a network interface for TCP/IP from the command line interface (CLI).This is another easy tool to see if your interface is actually loading correctly.

Example

ifconfig

eth0 Link encap:Ethernet HWaddr 00:0A:E6:C6:07:85
inet addr:132.18.0.16 Bcast:132.18.0.255 Mask:255.255.255.0
inet6 addr: fe80::20a:e6ff:fec6:785/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18458 errors:0 dropped:0 overruns:0 frame:0
TX packets:8982 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4015093 (3.8 MiB) TX bytes:1449812 (1.3 MiB)
Interrupt:10 Base address:0xd400

Route

This is very useful to check routing config

Example

route -n

Netstat

If you want to see Routing Tables,all open ports,all listen ports

netstat -nr

-n means return numeric output (ie, IP address instead of hostname)

-r means print the routing table

find all open ports

netstat -a

find listening ports

netstat -l


http://www.ubuntugeek.com/ubuntu-network-troubleshooting-tips.html


++++++++++++++++++++++++++++++++++++++

If you use a router or gateway, chances are that your network is even further locked down. To check, you can run the following commands:

Code:
sudo apt-get install nmap curl
and then:
Code:
nmap -P0 $(curl www.whatismyip.org
The second command may take several minutes to run, but will give you an accurate picture of which (if any) ports are open to the world outside your home network.

How can you check if iptables is blocking the packets ?

sudo iptables -L

Set Open Port for iptables

sudo iptables -I INPUT -p tcp --dport <> -j ACCEPT
sudo iptables -I INPUT -p udp --dport <> -j ACCEPT

If you want to have help enabling port forwarding in your router: http://www.portforward.com/english/routers/port_forwarding/routerindex.htm

No comments:

Blog Archive

About Me

Exclusion of liability Regarding StillStupid: The use you make of the guides, tips and downloads that you listed on this web site or on another website to which I refer is entirely at your own risk. In no way can I be held liable for damage or consequential damages of any kind, which occurs as a result of that use.