469,150 Members | 1,969 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,150 developers. It's quick & easy.

Nmap Problem

Loismustdie129
195 100+
I am using PCLinuxOS 2007 now. When I go into the terminal I attempt to see my open ports so i can open one for a game. When I try to run an nmap on 127.0.0.1, it returns no ports. So I guess I want to know if there is a command to show all the ports, opened or closed?
Jun 26 '07 #1
4 2121
prn
254 Expert 100+
Another way to see what is going on on various ports might be netstat.

Your open ports are already open because a particular daemon is already listening on them. You say you want to (re)open one of them for a game? Why not open a new port for the game? Most often, specific apps are coded to open specific ports. I seem to be missing something here.

There are literally thousands of ports "available" for use. In general, a program will open one for itself. I'm afraid I don't understand at all why you would want to reopen an already open port for a game. I suspect you have a major misconception of what a port is, but I cannot even be sure of that.

Basically, nmap or netstat will show which ports I actually have running programs (daemons) listening to. It would be a very bad idea, in general, to allow a game to take over, e.g., Port 22, which is basically the only way I can log into the computer from anywhere but the console.

Best Regards,
Paul
Jun 26 '07 #2
Loismustdie129
195 100+
Well, the game isn't working right and it said that a port may be closed that needs to be opened for the online play to work. I need to check if it is open to see if the game has a bad install. I have which port it needs open written down somewhere, but I can't find it right now. So, apparently, the progam didn't open the port like it should have or the game is bad, which is what I am trying to figure out.

I tried netstat but, to be honest, I couldn't read the results.
Jun 26 '07 #3
Motoma
3,237 Expert 2GB
Well, the game isn't working right and it said that a port may be closed that needs to be opened for the online play to work. I need to check if it is open to see if the game has a bad install. I have which port it needs open written down somewhere, but I can't find it right now. So, apparently, the progam didn't open the port like it should have or the game is bad, which is what I am trying to figure out.

I tried netstat but, to be honest, I couldn't read the results.
The easiest way to tell if the port is open is to just try and connect to it with netcat.
Expand|Select|Wrap|Line Numbers
  1. # nc localhost 23847
  2.  
Jun 26 '07 #4
prn
254 Expert 100+
And if you find that you can connect with nc, then that may tell you what you have connected to, e.g.:
Expand|Select|Wrap|Line Numbers
  1. # nc localhost 22
  2. SSH-1.99-OpenSSH_4.3
But in case you can't see what you have connected to, then you may want to know a little more about it and you may find out more with something like
Expand|Select|Wrap|Line Numbers
  1. # lsof -i tcp:22
which asks for information on what program currently owns port 22. You should get output like:
Expand|Select|Wrap|Line Numbers
  1. # lsof -i tcp:22
  2. COMMAND   PID USER   FD   TYPE   DEVICE SIZE NODE NAME
  3. sshd     2172 root    3u  IPv6     7773       TCP *:ssh (LISTEN)
which tells you that the SSH daemon (i.e., sshd) is what is listening on port 22.

HTH,
Paul
Jun 27 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

117 posts views Thread by Peter Olcott | last post: by
5 posts views Thread by lasek | last post: by
28 posts views Thread by Jon Davis | last post: by
6 posts views Thread by Ammar | last post: by
2 posts views Thread by Mike Collins | last post: by
2 posts views Thread by kauaikat | last post: by
reply views Thread by Daniel Folkes | last post: by
reply views Thread by Daniel Folkes | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.