Stop port (process) not used

  • Permalink
  • submit to reddit
  • Email
  • Follow


Hi all,

Sendmail is stopped and server is always listening to port 25 (SMTP) and 110
(POP).
Can you tell me why ?

By using command shell, is it possible to associate process ans port TCP/UDP
used ?
At the end, for security raisons, i need to stop all process not used as
sendmail, finger, time, printer, daytime... etc

ThankYou very much

Best Regards
NS


0
Reply ns 3/8/2005 2:59:28 PM

See related articles to this posting


ns <ns@none.ns> wrote:
> Hi all,

> Sendmail is stopped and server is always listening to port 25 (SMTP) and 110
> (POP).
> Can you tell me why ?

I've never seen sendmail listen on 110.  I think you're looking for
something else.

> By using command shell, is it possible to associate process ans port TCP/UDP
> used ?
> At the end, for security raisons, i need to stop all process not used as
> sendmail, finger, time, printer, daytime... etc

Easiest is to install and use 'lsof' to find such things directly...

lsof -i :25
lsof -i :110

If you can't do that, then run 'pfiles <PID>' on all the processes
(found in /proc) and see which ones have those ports open.  Oh, and you
need to be running Solaris 8 or later for that to work.

-- 
Darren Dunham                                           ddunham@taos.com
Senior Technical Consultant         TAOS            http://www.taos.com/
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >
0
Reply Darren 3/8/2005 4:43:45 PM

Hi all,

ThankYou very much Darren for your help !! It's work fine.

Best Regards
NS

"Darren Dunham" <ddunham@redwood.taos.com> a �crit dans le message de
news:5DkXd.13155$OU1.4528@newssvr21.news.prodigy.com...
> ns <ns@none.ns> wrote:
> > Hi all,
>
> > Sendmail is stopped and server is always listening to port 25 (SMTP) and
110
> > (POP).
> > Can you tell me why ?
>
> I've never seen sendmail listen on 110.  I think you're looking for
> something else.
>
> > By using command shell, is it possible to associate process ans port
TCP/UDP
> > used ?
> > At the end, for security raisons, i need to stop all process not used as
> > sendmail, finger, time, printer, daytime... etc
>
> Easiest is to install and use 'lsof' to find such things directly...
>
> lsof -i :25
> lsof -i :110
>
> If you can't do that, then run 'pfiles <PID>' on all the processes
> (found in /proc) and see which ones have those ports open.  Oh, and you
> need to be running Solaris 8 or later for that to work.
>
> -- 
> Darren Dunham                                           ddunham@taos.com
> Senior Technical Consultant         TAOS            http://www.taos.com/
> Got some Dr Pepper?                           San Francisco, CA bay area
>          < This line left intentionally blank to confuse you. >


0
Reply ns 3/9/2005 8:56:36 AM

Hi,

The command pfiles work fine but i can't find entry for following port
opened : 25 and 110 (smtp and pop)
For port 25, i confirm that process sendmail is stopped and no entry for 110
and 25 on inetd.conf

Any idea ?

ThankYou very much

Best Regards
NS



"Darren Dunham" <ddunham@redwood.taos.com> a �crit dans le message de
news:5DkXd.13155$OU1.4528@newssvr21.news.prodigy.com...
> ns <ns@none.ns> wrote:
> > Hi all,
>
> > Sendmail is stopped and server is always listening to port 25 (SMTP) and
110
> > (POP).
> > Can you tell me why ?
>
> I've never seen sendmail listen on 110.  I think you're looking for
> something else.
>
> > By using command shell, is it possible to associate process ans port
TCP/UDP
> > used ?
> > At the end, for security raisons, i need to stop all process not used as
> > sendmail, finger, time, printer, daytime... etc
>
> Easiest is to install and use 'lsof' to find such things directly...
>
> lsof -i :25
> lsof -i :110
>
> If you can't do that, then run 'pfiles <PID>' on all the processes
> (found in /proc) and see which ones have those ports open.  Oh, and you
> need to be running Solaris 8 or later for that to work.
>
> -- 
> Darren Dunham                                           ddunham@taos.com
> Senior Technical Consultant         TAOS            http://www.taos.com/
> Got some Dr Pepper?                           San Francisco, CA bay area
>          < This line left intentionally blank to confuse you. >


0
Reply ns 3/9/2005 11:23:11 AM

Hi Darren,

Can you tell me where can i find version "lsof" pre-compiled for
Solaris-Sparc please ?

Thanks a lot
NS

"Darren Dunham" <ddunham@redwood.taos.com> a �crit dans le message de
news:5DkXd.13155$OU1.4528@newssvr21.news.prodigy.com...
> ns <ns@none.ns> wrote:
> > Hi all,
>
> > Sendmail is stopped and server is always listening to port 25 (SMTP) and
110
> > (POP).
> > Can you tell me why ?
>
> I've never seen sendmail listen on 110.  I think you're looking for
> something else.
>
> > By using command shell, is it possible to associate process ans port
TCP/UDP
> > used ?
> > At the end, for security raisons, i need to stop all process not used as
> > sendmail, finger, time, printer, daytime... etc
>
> Easiest is to install and use 'lsof' to find such things directly...
>
> lsof -i :25
> lsof -i :110
>
> If you can't do that, then run 'pfiles <PID>' on all the processes
> (found in /proc) and see which ones have those ports open.  Oh, and you
> need to be running Solaris 8 or later for that to work.
>
> -- 
> Darren Dunham                                           ddunham@taos.com
> Senior Technical Consultant         TAOS            http://www.taos.com/
> Got some Dr Pepper?                           San Francisco, CA bay area
>          < This line left intentionally blank to confuse you. >


0
Reply ns 3/9/2005 5:28:27 PM

>> On Wed, 9 Mar 2005 18:28:27 +0100,
>> "ns" <ns@none.ns> said:

> Hi Darren, Can you tell me where can i find version "lsof"
> pre-compiled for Solaris-Sparc please ?

http://www.blastwave.org/packages.php/lsof
0
Reply Tony 3/9/2005 5:32:07 PM

Thank you Tony, i disn't seen binaries directory...

Best Regards
NS

"Tony Curtis" <tony_curtis32@yahoo.com> a �crit dans le message de
news:87is40n2so.fsf@limey.hpcc.uh.edu...
> >> On Wed, 9 Mar 2005 18:28:27 +0100,
> >> "ns" <ns@none.ns> said:
>
> > Hi Darren, Can you tell me where can i find version "lsof"
> > pre-compiled for Solaris-Sparc please ?
>
> http://www.blastwave.org/packages.php/lsof


0
Reply ns 3/10/2005 9:04:52 AM
comp.unix.solaris 25773 articles. 87 followers. Post

6 Replies
924 Views

Similar Articles

[PageSpeed] 22


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

How can a new process use a used port?
I thought a new process could not use a TCP port already used by another process. But on an Oracle database server, two processes both open 1522 on the same IP. They were started completely independent of each other (not from a common parent that opened port 1522 earlier). #TNS listener: $ ps -fp 17413 UID PID PPID C STIME TTY TIME CMD oracle 17413 1 0 01:49:00 ? 0:00 /export/home/oracle/ products/9205/bin/tnslsnr LISTENER -inherit $ pfiles 17413 .... 9: S_IFSOCK mode:0666 dev:284,0 ino:14870 uid:0 gid:0 size:0 O_RDWR FD_CLOEXEC sockname: AF_INE...

How can a new process use a used port?
(This is not nessarily a programming question but hopefully somebody here knows the answer. The system is SunOS 5.8 Generic_108528-18 sun4u sparc SUNW,Sun-Fire-480R.) I thought a new process could not use a TCP port already used by another process. But on an Oracle database server, two processes both open 1522 on the same IP. They were started completely independent of each other (not from a common parent that opened port 1522 earlier). #TNS listener: $ ps -fp 17413 UID PID PPID C STIME TTY TIME CMD oracle 17413 1 0 01:49:00 ? 0:00 /export/home/oracle/ products/9205/bin/tnslsnr LISTENER -inhe...

finding ports used by a process
hello, i need to check whether a process with somepid is using a perticular port could you please tell me which option of lsof i need to use or is there any other way to do this other than using lsof In article <1164355662.177078.91740@m7g2000cwm.googlegroups.com>, koushik <keshava.koushik@gmail.com> wrote: > hello, i need to check whether a process with somepid is using a > perticular port could you please tell me which option of lsof i need > to use or is there any other way to do this other than using lsof #!/bin/sh proc_count=`lsof -p $pid | grep -c LISTEN` if ...

S9: which process uses the port ?
Hi all While in Linux, finding out PID of the process which uses certain port is incredibly simple (using 'fuser port_no/[tcp | udp]'), I'm quite clueless on how to do it on Solaris (9). I don't think Solaris version of fuser can be of any use (or I can't read the FM), instead, I can use nmap, netstat, lsof,... and I need to get PID of the process that uses particular port (I can get the rest of the information from 'ps') Any advice ? B. -- "There is no dark side of the moon really. Matter of fact it's all dark." Katar�na "Bubli" M...

How do I find which process is using which port
Hi, I want to know if we can findout which process is using which all ports. Are there any options in netstat/ps which can do this or do we have a different command which can do this? Thanks in advance, Srivatsa. "Srivasta R." <vatsa.at.cisco.com> writes: >Hi, > >I want to know if we can findout which process is using which all ports. >Are there any options in netstat/ps which can do this or do we have a >different command which can do this? lsof -- "The road to Paradise is through Intercourse." [email me ...

How to get the process id that is using a port
I have no root privilege. how could i find the process id that is using a port. Or, could I get the username who is using a port? Hi Tristan, You can use lsof command for that. "lsof -i" and you will see all processid how 're using your sockets. man page: http://www.netadmintools.com/html/lsof.man.html Regards. On 11 d=E9c, 07:21, Tristan <sooq...@gmail.com> wrote: > I have no root privilege. how could i find the process id that =A0is > using a port. > > Or, could I get the username who is using a port? Michael, Thanks. I've tried lsof but failed...

Zombie port being used UNKNOWN BY WHAT PROCESS
We have a server with a variety of processes running and listening to various ports. They tend to work well. One in particular, not remarkable in any way, listens on port 45764. Today it is no longer is able to listen and says listen failed. My investigation turned up the following facts: 1) If I telnet to this port, connection gets established 2) fuser -t 45764/tcp outputs NOTHING 3) netstat -aep outputs .... stuff ... tcp 0 0 *:45764 *:* LISTEN root 12180 - .... stuff ... Most other lines ...stuff... contact the PID ...

Stopping two processes using pkill in a script
Problem: I was using pkill to kill a single process inside of a simple shell script. Like show below: /usr/bin/pkill -f -u root myProcess01 But I wanted to have this single script also be responsible for stopping another process after I stopped the first. Like show below: /usr/bin/pkill -f -u root myProcess01 /usr/bin/pkill -f -u root int_myProcess01 The problem I am seeing is that the first pkill runs and stops the correct process, but the second pkill never executes and the process continues to run. Question: How can I get it so that my first pkill executes, then my second pkill execu...

How to I find which processes is using particular port Num
Hi All, I would like to find out which process is using particular port number. Is there anything like that or not? Thanks in-advance. With regards Sastry In article <beju2l$j33$1@newshost.mot.com>, sastry <sastry@motorola.com> wrote: >Hi All, > I would like to find out which process is using particular port >number. Install "lsof" if it's not already on your system. -- Barry Margolin, barry.margolin@level3.com Level(3), Woburn, MA *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups. Please DON'T c...

monitor boot process using serial port
I have a netbsd 3.1 box that is headless, and a Windows laptop. The laptop has some software that will let me use the serial port as a terminal, and I have the serial cable and a null-modem adaptor for it. On the netbsd box: $ dmesg | grep "^com" com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo com3 at isapnp0 port 0x2f8/8 irq 3: ns16550a, working fifo How can I view the netbsd boot process from the serial port, please? Is there a special /etc/ttys entry necessary to direct the boot sequence output to the serial port so that I can see it from the laptop serial communica...

How to stop process using another user (not creator)?
Dear all, I want to create a TACL MACRO routine to do something,like : 1.STOP $PROCESS_A 2.OBEY FILE_A to create $PROCESS_A again. The user( name ADMIN) is process owner of $PROCESS_A But,I will user another user( name OPER) to run TACL MACRO. question : 1.How to use user (OPER) to stop $PROCESS_A( user id ADMIN) Any suggeustion will help me ,thank you ! Ray Yeh In article <1159923689.970688.186510@i3g2000cwc.googlegroups.com>, "Ray" <yeh_ray@hotmail.com> wrote: >Dear all, > I want to create a TACL MACRO routine to do something,like : >1.STOP $P...

TCP/IP how to determine which process uses what IP-port?
Hello! How do I determine/show which processes is currently using what IP-port (TCP and UDP)? The Alphaserver is running OpenVMS 7.3.2 wiht HP TCP/IP Services 5.4. Regards Martin Hi ! ucx sho dev sho dev /full Martin Eismann wrote: > Hello! > > How do I determine/show which processes is currently using what > IP-port (TCP and UDP)? The Alphaserver is running OpenVMS 7.3.2 wiht > HP TCP/IP Services 5.4. > > Regards > Martin > -- + WBR, OpenVMS [Sys|Net] HardWorker .................................+ Delta Telecom Inc., NMT-450i, IMT-MC-450(CDMA2000) cellular ...

TCP servers in Python
I am writing programs that will run as TCP servers. Briefly, I want to set up a TCP server on a port in such a way that if another server is already sitting on that port (both servers are Python programs I will be writing), the old one is booted off (and its process ended). My master process is a test harness, which tests a script which as part of its functionality sends http GET messages. My test harness sets up an http server as a child process, by creating an instance of popen2.Popen3(). The child process is a very simple program using SimpleHTTPServer. The problem is when I run my...

How can i find the process name using a known TCP port ?
Hi ! I need to define programatically what process is using a known port on my own pc... This is not really a port 'scanner' : i want to test a defined used port # and possibly find the process using it ( process name, as displayed in task manager/processes ) Where do i start ? HELP ! Best regards, Eddy. ...

How to identify TCP port number used by JAVA processes on OSS environment
I had no luck in identifying port numbers used by JAVA processes running on the OSS environment. Unlike in guardian application, figuring out the port number associated with OSS processes seem to be next to impossible. SCF listopens shows one of OSS transport agent processes, $ZTA?? as the socket opener. How do we associate user processes to $ZTA?? to find the port number used by user processes. Am Donnerstag, 5. April 2012 05:53:04 UTC+2 schrieb Raja Bharathi: > I had no luck in identifying port numbers used by JAVA processes > running on the OSS environment. Unlike in guardian appli...

MFC application using COM port for serial communication stops on minimization
Hi, I'm working on a MFC application that is used to write application code to FLASH memory of a device. I'm using COM port for the communication with the device. For reading from and writing to the COM port, separate threads (along with semaphores) are being used. This application works fine if it is not minimized. But once if the application is minimized, it gives an error because some data is being missed out during communication with the device. Has anybody faced the same problem....?? Can anybody help me out with this problem. Thanks, -KC karpagam.c@gmail.com wrote: > Hi, ...

how do you "properly" close ports and stop timers when using a close GUI?
So I have this simple program that takes in RS232 data and just displays it to the screen. Note this is a GUI the problem that im facing is how to stop a timer that ive set up and close any open serial ports once the program is stopped. Ive basically done this... http://www.blinkdagger.com/matlab/matlab-gui-tutorial-close- gui-confirmation but instead of the confirmation window, Im closing ports and stopping timers with the closeGUI function. My problem is that I cant seem to figure out HOW to pass the handles to this function. set(handles.figure1,&#8217;CloseRequestFcn&#821...

Tool for getting non-root processes to use ports <1024
In the past I looked around for a way to allow non-root processes to access ports <1024. Everything I found pointed to either capabilities or firewall tricks (but perhaps I didn't look hard enough), but I did not find any easy solution. So I wrote up some simple code myself for a simple service which allocates a TCP/IP port as root, opens a unix domain socket, and then allows my non-root server to use this port to access the <1024 port. Works fine, requires no capabilities support, even ports to freebsd. Since this root-running process is just a couple of hundred lin...

Basic web page with links that start/stop processes using Apache(newbie)
I need to develop a very basic web site for Apache with the list of links (may be represented by the buttons). Each one of those links execute a script on the host machine (linux 2.4.20 running apache 1.3). I had never done any apache/web related work. Can anybody give me hints/code snippets etc? Thank you very much!!! I need this web page to control shoutcast servers sitting on my machine. I have two available ports and many radio stations that I want to relay. I figured I can setup many server instances relaying different stations but sitting on the same port. This web ser...

how stop training process in NN automatically when MSE value not change without using validation set (because my data is small) ?
hi, how stop training process in NN automatically when MSE value not change without using validation set (because my data is small) ? thanks in advance Hi M, I am not sure if this really helps, but see if it does - >TRAIN calls the function indicated by NET.trainFcn, using the training parameter values indicated by NET.trainParam. Training occurs until a maximum number of epochs occurs, the performance goal is met, or any other stopping condition of the function NET.trainFcn occurs. (The above is a section from help documentation of the 'Train' function) I tried looking up ex...

problem while starting a process which is using DLL when being called using the create process
Error is as follows :- Runtime Error 429 : ActiveX component cannot create object OS: Win NT 4, VB-6.0 I have a custom made dll Project A spawns the Project B exe file through CreateProcess. Project B is using the dll. Error 429 comes on this line CreateProcess. ProjectB runs fine independently. We have also tried using Shell for spawning the process but same error. We also tried unregistering and registering the dll . Pls help. ...

Q: TCP source port tries to use port already in use
Hi, I have a Win2k3 FTP server. Other server applications also reside on the same machine (mainly filesharing clients in active mode, i e accepting connection establishment originating from external client). I have noticed that sometimes incoming TCP sessions sometimes try to establich connection using source ports (in port 1025+ range) that are already in use by ongoing sessions. This results in TCP reset from the server. From what I can see in my analyser trace both sessions are terminated (TCP RST) when these types of collision occure. My question is: Is the TCP stack suppose...

When to stop
Hello This is part coding and part protocol design. I am developing a very simple protocol and working out how to parse out received data into messages. I can process the stream of bytes just about but I think I need help in design. My data is in tlv format and I might get 1 or many tlv's to parse. I know the length of the entire byte stream. This is what I have so far: #include <stdio.h> const char* getType(size_t type) { switch(type) { case 0: return "uint8_t"; case 1: return "byte array"; default: return "unkn...

How to stop a thread without using stop()
There is a thread which calls just ONE METHOD. The problem is the method can work for 1 sec to more than 10minutes. I have to stop if the thread work for more than 10 secs and I don't have the source of the method - but, I have to use the method. Thread.stop() method is deprecated.. So, I tried using interrupt() method, but it did not work. Then how can the thread be stopped without using stop() ?? Thank you. -- ** Son KwonNam Please DO NOT reply to this message's email address. The address is fake. Son KwonNam wrote: > The problem is the method can work for 1 sec to more th...