Display open ports "Confused :S"
Hi guys Iam configuring my firewall on my debian router....Ive blocked everything on eth0 except http and ssh.....and Ive not blocked anything on eth1...and the firewall is stateful with masquerading enabled.
When I was trying to test my firewall..I used the following command: nmap -sS "ipaddress of eth0" My understanding is that only the ports of ssh and http should be displayed !!! The following was the output: The 1656 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 22/tcp open ssh 53/tcp open domain 80/tcp open http 111/tcp open rpcbind 113/tcp open auth 199/tcp open smux 615/tcp open unknown To make things more confusing "at least to me" I have executed the following command to display open ports on eth1: nmap -sS "ipaddress of eth1" And the output was the same as above !!!! What has happened?? Does nmap only display hte open services regardless of the nic....or what am I doing wrong.....I need a way to know what ports are open on each nic.... Note: the firewall configuration is flawless, I ve already posted it and asked about that. |
netstat -an
WIll show a list of listening ports, established connections etc.. If there is a port that is open, and you don't know what service is listening on it you can use lsof. lsof -i tcp:615 |
Quote:
Did you shutdown those services or commented out those services from /etc/services or with iptables you blocked those ports or with some other way ? Please mention.. I let me clear my self with firewalls you actually block the ports & didnt close them. ..amit.. |
Aha........actually I only blocked them through my firewall.....!!
|
Quote:
|
You mean I should comment them out ?? Actually, these services are not accesible since Ive blocked the ports right ?
|
Quote:
You can verify that commenting out ftp service tcp & udp port 21 wont close that service & you would still be able to connect to ftp. |
Now Iam really confused..........All that I want to do is to check for open ports on my PC.......not for running services
|
Quote:
In case you want to see for open ports, Run nmap. |
All times are GMT -5. The time now is 05:34 PM. |