Guest MajinNitz Posted February 16, 2003 Report Share Posted February 16, 2003 Heres a 2 parter, i would rather learn how to do things manually than through a GUI so .... (1) I am manually shutting down samba and ftp and mail server every time i boot right now because I set them up with Mandrake and now they are open ports. I used IPTABLES to block port 139 (i think it worked). Now, to prevent these services from startup i am a little confused. Do i delete,for instance, /etc/rc3.d/S85proftpd ? Please advise if i am makin a mistake in thinking this. (2) Later on I plan to have samba shares on the LAN, so i assume this is all done with IPTables? thanks in advance Quote Link to comment Share on other sites More sharing options...
paul Posted February 16, 2003 Report Share Posted February 16, 2003 1. man chkconfig example: chkconfig -del samba 2. huh? you want to mount samba shares over the lan ??? nope does use IPTables... IPTables are TCP/IP packet sniffer, they don't control anything on your computer. What they do is check each and every packet that comes in to computer (or goes from your computer, or passes through you computer) if you want to turn off servers (example: pop3) you first of all shutdown your pop3 server bash $ /etc/init.d/postfix stop if you want to make sure that nobody can hack into your box through port 110 (thats the port pop3 uses) then you would block 110 with IPTables REJECT tcp -- anywhere my.machine.name state NEW tcp dpt:110 or something like that anyway :-) Quote Link to comment Share on other sites More sharing options...
Guest MajinNitz Posted February 18, 2003 Report Share Posted February 18, 2003 Thanks chkconfig seems to have done the trick, now heres a new question: Is there a command to find what program is opening a specific port? Quote Link to comment Share on other sites More sharing options...
aru Posted February 18, 2003 Report Share Posted February 18, 2003 Is there a command to find what program is opening a specific port? netstat nmap check their man pages Quote Link to comment Share on other sites More sharing options...
Guest MajinNitz Posted February 18, 2003 Report Share Posted February 18, 2003 Thanks i got nmap installled and i run it, but, for instance, it says port 21 is open and the service is listed as FTP. I know that the ftp program is a ProFTP , but nmap does not tell me that. I want to know the exact service name so I can disable it at boot time. I am trying to do it manually. Ok i think i just figured it out mid-post. I checked the netstat manual and it has a -p option which shows the pid for which each socket is connected to. Hope this helps anyone else with similiar problem. I read man nmap and could find nothing of the sort. I wouldn't expect a remote scanner to easily be able to tell what exact service or pid is being run on a particular port. Could you please share if there is? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.