Monday, March 16, 2015

Monitor Linux (Ubuntu) network traffic in real time

== Monitor incoming network traffic in real time:
[http://manpages.ubuntu.com/manpages/lucid/man1/tcptrack.1.html]

ifstat
iftop
iptraf
tcptrack

== Commands to verify ports:
[https://www.serverpronto.com/accounts/knowledgebase.php?action=displayarticle&id=11]

nmap IP#
nmap localhost
netstat –ntulp

== to verify single port

netstat -nap | grep 

== to list all current rules in iptables

iptables -L

== For opening a TCP port:

iptables -A INPUT  -p tcp –dport -j ACCEPT

== For opening a UDP port:

iptables -A INPUT -p udp –sport   -j ACCEPT

== Save changes:

iptables-save > /etc/iptables.rules

== If you need to disable the firewall temporarily, you can flush all the rules using:

iptables -F

No comments:

Blog Archive

Followers