LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Opening and closing ports (https://www.linuxquestions.org/questions/slackware-14/opening-and-closing-ports-401714/)

stormtracknole 01-10-2006 02:18 PM

Opening and closing ports
 
Hello,

I'm trying to figure out how to open ports and start certain services in Slackware. To be more specific, I want to open or start port 111, among other services. I know about editing the /etc/inetd.conf file, but only a handful of ports are there. I have researched some here and google, but I haven't found the answer. I'm also trying to open applications through ssh, but I have not been very succesful. My guess is that I don't have a service running. Any help will be appreciated.

odevans 01-10-2006 02:35 PM

If you don't have any firewall / iptables rules in effect, then ports will be "closed" unless a service is running on that port. To open port 111 you need to start a service running on port 111. Port 111 is SunRPC - I'm curious about what you'd need that for.

When you say you can't open applications through ssh, what do you mean? Can you not login to your machine with ssh?

Try "ps -e | grep sshd" to see if ssh is running and "nmap localhost" to see what ports are open.

stormtracknole 01-10-2006 02:46 PM

Quote:

Originally Posted by odevans
If you don't have any firewall / iptables rules in effect, then ports will be "closed" unless a service is running on that port. To open port 111 you need to start a service running on port 111. Port 111 is SunRPC - I'm curious about what you'd need that for.

I'm trying to use VNC. When I try to use it, it says that port 111 is not open.

Quote:

Originally Posted by odevans
When you say you can't open applications through ssh, what do you mean? Can you not login to your machine with ssh?

Try "ps -e | grep sshd" to see if ssh is running and "nmap localhost" to see what ports are open.

Ok, let me be more specific, I'm logging in from machine a to machine b through ssh. I want to use an application in machine b. So, I do export DISPLAY=machinea:0.0. I don't get any errors, but when I try start an application, like lets say, mozilla, it gives me an error. Is there a service that I need to start?

mdarby 01-10-2006 02:57 PM

If both machines on are on the local network you don't need to open ports. By default VNC runs on port 5900, just connect to "machine_name:0"

odevans 01-10-2006 02:59 PM

What VNC program (viewer and server) are you using? VNC usually runs somewhere in the 5800-5900 port range.

To do X forwarding over ssh, have a good read of the sshd man page

stormtracknole 01-10-2006 03:05 PM

Thanks for the info. Now I have to figure out how to forward X through ssh.

stormtracknole 01-10-2006 03:07 PM

Quote:

Originally Posted by odevans
What VNC program (viewer and server) are you using? VNC usually runs somewhere in the 5800-5900 port range.

To do X forwarding over ssh, have a good read of the sshd man page


I'm using the viewer. But every time I try to connect, the connection by the remote machine is refused. Not sure what I'm missing.

odevans 01-10-2006 03:35 PM

Quote:

Originally Posted by stormtracknole
I'm using the viewer. But every time I try to connect, the connection by the remote machine is refused. Not sure what I'm missing.

Could you be a little more specific? What VNC viewer program are you using and what VNC server is running on the remote machine? As has been said, VNC usually runs on port 5800. If we know exactly what you're running, we'll be able to help get you up and running.

Cheers,

odevans

stormtracknole 01-10-2006 03:40 PM

Quote:

Originally Posted by odevans
Could you be a little more specific? What VNC viewer program are you using and what VNC server is running on the remote machine? As has been said, VNC usually runs on port 5800. If we know exactly what you're running, we'll be able to help get you up and running.

Cheers,

odevans

Opps...figured it out. I had to set up the vncserver in the remote machine. Now I'm trying to figure out how to use remote applications through ssh. :confused:

odevans 01-10-2006 03:54 PM

On the remote machine (the one you want to run the application on) edit your /etc/ssh/sshd_config and uncomment (remove the #) from the line:

Code:

X11Forwarding yes
Restart the ssh server on the remote machine for that change to take effect:

Code:

root@server:# /etc/rc.d/rc.sshd restart
Now, on the local machine, from a terminal in a X window (konsole, xterm, rxvt etc):

Code:

user@client:$ ssh -X user@server
Try typing a command (eg xclock) and you should see the clock on your local display.

stormtracknole 01-11-2006 08:29 AM

Quote:

Originally Posted by odevans
On the remote machine (the one you want to run the application on) edit your /etc/ssh/sshd_config and uncomment (remove the #) from the line:

Code:

X11Forwarding yes
Restart the ssh server on the remote machine for that change to take effect:

Code:

root@server:# /etc/rc.d/rc.sshd restart
Now, on the local machine, from a terminal in a X window (konsole, xterm, rxvt etc):

Code:

user@client:$ ssh -X user@server
Try typing a command (eg xclock) and you should see the clock on your local display.

Thanks so much! I had gotten as far as editing the sshd_config file before, but I was editing the local machine and not the remote one. Again, thanks so much for your time. Linuxquestions rock!! :D


All times are GMT -5. The time now is 11:56 PM.