Should these be here? What are they and how do i stop them from showing up when i do netstat? How do i just show my open ports, nothing else, in a list. E.G:
21
23
80
81
…
(is that even possible?)
Also, how do i open a port? I have my firewall turned off.
Use Yast and go to the Firewall section.
Go to Allowed Services then the advanced section. Add Port numbers as required. Do the same in your router if you have one.
netstat -t doesn’t show my LISTEN ports. I am trying to get port 303 to be listening to connections, Then i want to check its listening with netstat. How do i do that??
netstat doesn’t show the rules of the firewall, only what ports processes have open. So the answer is not netstat.
So it means that if the port is not visible in netstat, then you don’t have anything listening at that port so you need to fix this before you worry about the firewall rules.
ken yap wrote:
> You have to run a server process on that port.
>
>
It’s funny (and a bit sad) that sites like grc.com managed to make
people believe that “opening a port” on a firewall equals “something
listening and letting bad guys in”.
A program makes a port listening (as your are wording it).
The steps are:
run a program (normaly this is a so called deamon) that attaches to port 303 for listening via TCP and/or UDP;
check via netstat that the port is LISTENING;
configure your systems firewall so that it can be seen from outside;
configure the firewall of your router (when in place) so the posrt cn be reached from the internet (when desired).
Do not bother about the unix ports they do not go outside your system.
Edit: i missed the two posts above when typing. And yes they are right, it is sad and not encouraging.
I am afraid we misunderstand you or you misunderstand us (or both).
One does not simply want a port to be ‘opened’. One wants to run a program that provides a TCP/IP service. That program happens to be configured (or hardcoded) to listen to one (or more) TCP and/or UDP ports. It does so either by himself (e.g. Apache that listen to e.g. port 80 or 8080 or …) or one let xinetd do the listening (and xinetd starts then the service program for every incoming cliient). Examples of the last are ftp and rsync services.
May be when you explain a bit more about what you think an opened port 303 must do? Which service is to be provided?
I wanna ssh using port 303. I know ssh has its own port… But i want to use 303 on both computers i have. I have the command to use ssh with port 303. But doesn’t it need to be listening for a connection??
have you set the SSH daemon to use port 303? Look in
/etc/ssh/sshd_config for the parameter. Change from 22 to 303 and
uncomment if necessary, then restart the daemon. Also be sure your
firewall is not blocking the port once this is done.
Good luck.
DrEaMeR23 wrote:
> I wanna ssh using port 303. I know ssh has its own port… But i want to
> use 303 on both computers i have. I have the command to use ssh with
> port 303. But doesn’t it need to be listening for a connection??
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
You want to use ssh as a client and connect to port 303 and behind posrt 303 yoy want the ssh service. The ssh service is normaly provided by the program sshd.
Conclusion: you have to run sshd. This can be done using YaST > System > System Services (runlevel).
But you do not want sshd to listen on port 22, but on 303. That means you have to configure something. See the man page for sshd. There is the -p option, but it can also be put in a configuration file.
(As an extra I personaly find it very convenient to put man:sshd in the address bar of konqueror to read the man page).
Please start reading and exprimenting. When you have further questions you ask them.
You can tes if the sshd runs via:
ps -ef | grep sshd
and if port 303 is listening with
netstat -rn | grep 303
May be a few lines extra will shoe, but you will recocnise the important ones when you see them.