raffe
August 29th, 2002, 05:21
I have had my opensd 3.0 box up on the net for some time. I just instaled nmap and run a scan on my box and it found these ports to be open.

Port State Service
13/tcp open daytime
22/tcp open ssh
37/tcp open time
80/tcp open http
111/tcp open sunrpc
113/tcp open auth
8081/tcp open


How do i know what is running on each port(is nmap correct about the service?)? I am really not sure about 8081. How do i stop it? Witch program runns on that port? Do I need daytime.sunrpc and auth?

Raffe

hegobald
August 29th, 2002, 09:27
Look in "/etc/services"
Lots of useful information.

You can start and stop services by editing "/etc/rc.conf"
For more info look at the OpenBsd faq.

frisco
August 29th, 2002, 10:09
How do i know what is running on each port(is nmap correct about the service?)?
nmap is getting the service name from /etc/services. but you can run any server on any port, like httpd doesn't need to run on 80, just usually does.

use lsof (it's in the ports tree) to see what app is using what port.
`lsof -i`


I am really not sure about 8081. How do i stop it? Witch program runns on that port?
I'm not sure about it either, but it's not my box. Use lsof to determine what app is tied to that port.

You have been keeping up-to-date on patches, yes?


Do I need daytime.sunrpc and auth?
I don't know, do you? What are you trying to do with this server? This is like asking if you need apaceh running - well it depends on the fucntionality you want.

IcePic
September 6th, 2002, 05:56
How do i know what is running on each port(is nmap correct about the service?)? I am really not sure about 8081. How do i stop it? Witch program runns on that port? Do I need daytime.sunrpc and auth?

Raffe
netstat -a will tell you more.

kremlyn
September 9th, 2002, 00:44
It's been said that it is possible to change what server/service runs on what port..

I know how /etc/services and /etc/rc.conf (and the rc init in general) work..

My question is, how can one change the port to which a service is bound? Does one do this with a command line argument to the server daemon or some other way?

//kremlyn

elmore
September 9th, 2002, 01:21
Well, that actually depends on what service you're running. For instance, in Apache httpd is bound to the port you tell it in /var/www/conf/httpd.conf on the port line for example. This really varies from service to service and program to program.

kremlyn
September 9th, 2002, 05:29
I thought that was the case, just wanted to make sure I wasn't missing anything :)

//kremlyn

frisco
September 9th, 2002, 12:41
My question is, how can one change the port to which a service is bound? Does one do this with a command line argument to the server daemon or some other way?

you could always run the service "normally" and redirect from some other port using nat. Seems a little sloppy, but it has its place.

mca1
November 12th, 2002, 11:51
You don't mention what services you are offering on the server, but for my workstations I only have ssh running (on port 2222 instead of 22) and then http and ssh on a web server.

There is definately no need for daytime of time to be running. If you connect to port 8081 does it give you a banner?