Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] want to open my ports to play with netcat
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
inlogger
n00b
n00b


Joined: 11 Feb 2007
Posts: 7
Location: Adelaide, Australia

PostPosted: Sun Feb 25, 2007 5:29 pm    Post subject: [SOLVED] want to open my ports to play with netcat Reply with quote

I type
Code:
nc -l 75

into one terminal, and then
Code:
nc localhost 75

into another terminal. and I get
Code:
(UNKNOWN) [127.0.0.1] 75 (?) : Connection refused

and it happens no matter what port I choose, except 631, which I have a cups server running on.

I've tried both as my normal user and as root with no difference.

I think it doesn't work because all my ports are closed, and getting netcat to listen to one of them isn't enough to open it. If so, how can I open my ports? Otherwise, what's going on?

I also have Gtk-gnutella, and it says my computer is firewalled. My computer is behind NAT, but I have a port forwarded for my gtk-gnutella which I've TOLD it to listen to, and still it's says that it's firewalled. Could this be the same problem?


Last edited by inlogger on Sun Feb 25, 2007 6:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Sun Feb 25, 2007 5:49 pm    Post subject: Reply with quote

a TCP port can be in 3 states:

  • non-existant, sometimes called "stealth": everything you send to it disappears
  • closed: when you try to open a connection, he refuses (ie, sends a reset packet back)
  • open

if you get connection refused, it's most likely just that, "closed", and probably not firewalled, since firewalls usualy do "stealth".

Maybe something: regular users aren't allowed to listen on ports < 1024; so you should try something higher.
you can also check
Code:
netstat -l --inet
to list listening ports
Back to top
View user's profile Send private message
inlogger
n00b
n00b


Joined: 11 Feb 2007
Posts: 7
Location: Adelaide, Australia

PostPosted: Sun Feb 25, 2007 6:44 pm    Post subject: Reply with quote

I figured out why netcat wasn't working. I was typing "nc -l 75" when I should have been typing "nc -l -p 75" with a "-p" to specify what port to listen to (and open).

Don't know what it was making of my "nc -l 75" commands. :roll:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum