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.
I have a home server running and I would like to:
1) make sure my current iptables are safe for the application (I need SSH and HTTP, will send my settings later because I just lost connection w/ it)
2) how can I log all traffic thru my interface? I would like to know where the request was originated and what it means. Is it possible to add some MAC filtering to the enabled services using iptables?
3) how do I change the port I am running, SSH, say to port XYWZ?
Hope this helps...
1. You can have your firewall scanned by plenty of sites on the web. Have a look at http://scan.sygatetech.com/ and http://www.hackerwatch.org/probe/ - they should be able to give a report on your open ports.
2. You can log traffic through the interface either by logging with iptables or with a packet sniffer. Have a look at ethereal at http://www.ethereal.com/ and the man page for tcpdump.
3. To change the port that SSH is running on, have a look in /etc/ssh/sshd_config. You can change the port number with the Port entry (make sure you restart SSH). I'd recommend disabling password access and using keys/certs exclusively for SSH.
Can I use any port for ssh? Even one that is supposed to be used by another service that I dont implement here? ALso, how can I make sure that my SSH and HTTP are safe? I ran the 2 tests you suggested and all they tell me is that those are the onlu open ports I have. I want to know how vulnerable my settings are and how I can increase my secutiry. Thanks for your help.
I'd recommend using keys instead of passwords (PasswordAuthentication no) for SSH, it means that nobody can get in by guessing your password. I'd also suggest not allowing root logins (PermitRootLogin no) and that you use su to get access to privileged accounts.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.