Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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)
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.