Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: How do you check a network port is open?< Next Oldest | Next Newest >
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: Sep. 16 2007,13:48 QUOTE

I'm trying to open up a network port in order to scan over the network. I added the following:

/etc/sources
sane-port          6566/tcp      # SANE network scanner daemon

/etc/inetd.conf
sane-port  stream  tcp  nowait  dsl.staff  /opt/hplip/sbin/saned saned

and then restarted /etc/init.d/inetd. So far things don't seem to be working - is there a way to check that the port is open from the same machine or another machine on the network? By telnet maybe?
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Sep. 16 2007,14:54 QUOTE

Does
by name:

# netstat -al  

by number

# netstat -nl  

help?
Back to top
Profile PM WEB 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Sep. 16 2007,15:59 QUOTE

You could either try to telnet to that port from another machine, or just do a portscan..

--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: Sep. 17 2007,15:08 QUOTE

Thanks
Code Sample
$ netstat -at
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 *:bootpc                *:*                     LISTEN    
tcp        0      0 *:swat                  *:*                     LISTEN    
tcp        0      0 *:time                  *:*                     LISTEN    
tcp        0      0 *:sane                  *:*                     LISTEN    
tcp        0      0 *:discard               *:*                     LISTEN    
tcp        0      0 *:vboxd                 *:*                     LISTEN    
tcp        0      0 *:daytime               *:*                     LISTEN    
tcp        0      0 *:ipp                   *:*                     LISTEN    
Looks promising.

But:
Code Sample
$ telnet localhost 6566
Trying 127.0.0.1...
Connected to box.
Escape character is '^]'.
Connection closed by foreign host.
albeit from the same machine.

and:
Code Sample
c: telnet \192.168.1.100 6566
...could not open connection to the host, on port 6566: Connect failed
from an xp machine, didn't look so promising.

Maybe this is an issue of user permissions?
Back to top
Profile PM 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Sep. 17 2007,15:14 QUOTE

..Or a firewall.. But if a port is open, telnetting to it will work, even from XP.
For fun try "telnet google.com 80" and see what happens (if you wanna pretend to be a web browser, type "GET / HTTP/1.0" without the quotes and you'll see google front page get loaded)


--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
8 replies since Sep. 16 2007,13:48 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: How do you check a network port is open?

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code