LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-19-2004, 06:26 AM   #1
abd_bela
Member
 
Registered: Dec 2002
Location: algeria
Distribution: redhat 7.3, debian lenny
Posts: 627

Rep: Reputation: 31
open and close network port


Hi, every body
Please someone can tell me how to open and close a network port. for example I want to close port 25 (smtp) and open another for the same process (smtp)

thank you in advance
bela
 
Old 08-19-2004, 06:52 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
what mail software do you use? You can certainly do it by making appropriate changes in the config files.
 
Old 08-19-2004, 09:16 AM   #3
abd_bela
Member
 
Registered: Dec 2002
Location: algeria
Distribution: redhat 7.3, debian lenny
Posts: 627

Original Poster
Rep: Reputation: 31
Thank you,
I want only to know how to oepn and close the port.

For example the netstat -l gives all the listenning port on network
thank you
 
Old 08-19-2004, 09:53 AM   #4
barisdemiray
Member
 
Registered: Sep 2003
Location: Ankara/Turkey
Distribution: Slackware
Posts: 155

Rep: Reputation: 30
Quote:
Originally posted by abd_bela
Thank you,
I want only to know how to oepn and close the port.

For example the netstat -l gives all the listenning port on network
thank you
If you want to close a port completely, simply kill the daemon which listens that port. For example if you don't use the SSH service, kill the sshd daemon and prevent it from running at boot. But if you want to block specific traffic like blocking all the SSH requests that comes from out of the internal network (or from a specific IP) then use a packet filter tool like netfilter.
 
Old 08-19-2004, 02:20 PM   #5
abd_bela
Member
 
Registered: Dec 2002
Location: algeria
Distribution: redhat 7.3, debian lenny
Posts: 627

Original Poster
Rep: Reputation: 31
Ok thank you ,
Now I want to open a new port and assign it to some daemon.

or suppose that the the 25 port is block for an unknown reason, so I want to assign to the smtp a new value and open it of course for traffic

thank you
bela
 
Old 08-19-2004, 03:40 PM   #6
barisdemiray
Member
 
Registered: Sep 2003
Location: Ankara/Turkey
Distribution: Slackware
Posts: 155

Rep: Reputation: 30
Quote:
Originally posted by abd_bela
Ok thank you ,
Now I want to open a new port and assign it to some daemon.

or suppose that the the 25 port is block for an unknown reason, so I want to assign to the smtp a new value and open it of course for traffic

thank you
bela
Then follow the ppuru's way and edit some configuration file. Most of the server daemon's configuration files has an option for a user-defined port to listen. You can find this specific information in your mail transport agent's documentation.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Which port should I close? schneemann Linux - Networking 5 11-15-2005 03:15 AM
nmap reports port 21 (ftp) open - how to close it? shazam75 Linux - Security 3 09-23-2005 07:13 PM
Can I just leave port 80 open, close everthing else? Andknig Linux - Security 1 05-05-2005 03:59 PM
cant get port 21 to close crosswire Linux - Newbie 4 09-14-2004 06:17 PM
Guarddog leaves Cups port 631 open, how do I close it? tigerflag Linux - Security 4 08-29-2004 12:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:53 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