LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-03-2002, 02:52 PM   #1
jimval7
Member
 
Registered: Jan 2002
Location: Dallas, TX
Distribution: RedHat 7.0 - Kernel 2.4.17
Posts: 95

Rep: Reputation: 16
Question how to turn off ports


I need to know how to turn off certain ports off completely, for example, i went into the /etc/services file and commented our certain ports like telnet, smtp and a few others and rebooted but when I had my firewall tested, it said the ports were open, I tried telneting from another machine to my firewall and I get connection refused, so what i dont understand, why is the test saying telnet port is open if i commented it out from /etc/services file. This is what I did:

# telnet 23/tcp
# smtp 25/tcp mail

Anyhelp????

 
Old 03-03-2002, 10:50 PM   #2
Scotty2435
Member
 
Registered: Dec 2001
Location: Waco, Texas USA
Distribution: Redhat 7.1
Posts: 232

Rep: Reputation: 30
if you can't connect to with telnet yourself and get a connection refused sort of message your probably save. Download nmap to do your own port scan on yourself.

http://www.insecure.org/nmap
 
Old 03-04-2002, 12:20 AM   #3
jimval7
Member
 
Registered: Jan 2002
Location: Dallas, TX
Distribution: RedHat 7.0 - Kernel 2.4.17
Posts: 95

Original Poster
Rep: Reputation: 16
Question Other file that open ports?

Thanks for the info Scotty, I ran nmap and for some reason i still have sunrpc, smtp, auth, and a few others opened even though i commented them out in /etc/services file. Is there another file that opens them?

 
Old 03-04-2002, 10:41 AM   #4
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
What distro?
 
Old 03-04-2002, 10:58 AM   #5
jimval7
Member
 
Registered: Jan 2002
Location: Dallas, TX
Distribution: RedHat 7.0 - Kernel 2.4.17
Posts: 95

Original Poster
Rep: Reputation: 16
distro

I have redhat 7.0 with kernel 2.4.17
 
Old 03-04-2002, 04:59 PM   #6
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
use ntsysv to turn off those services. or go to /etc/rc.d/rc*.d (whatever runlevel your in) and rename the S**whatever** to .S**whatever**, your simply hiding the files from the init scripts. Reboot.
 
Old 03-06-2002, 11:07 PM   #7
ryandelany
Member
 
Registered: Dec 2001
Location: Orange County, CA
Distribution: RedHat 7.2, 7.3, 8.0
Posts: 66

Rep: Reputation: 15
If you are going to rename the files in the /etc/rc.d/rc#.d directories, the better way to do it is rename from S##file to K##file. The K files are ignored, while the S files are parsed at startup and shutdown of the system.

Ryan
 
Old 03-07-2002, 07:59 AM   #8
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
files that start with .S are ignored also
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Open Mail Server Ports 25, 110, and 220. Other Ports will open. Binxter Linux - Newbie 9 11-29-2007 02:03 AM
How to start, stop, turn on, and turn off deamons BuckRogers01 Debian 3 08-16-2005 09:39 AM
turn off doesn't really turn and power off pcandpc Mandriva 11 05-30-2005 03:22 PM
Turn off? theonebeyond Slackware 7 09-30-2004 11:30 PM
How to turn off Xserver in the gui and turn it off in the command line geminiviper Linux - Newbie 8 08-20-2004 08:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration