Linux - Security This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
03-02-2006, 04:58 PM
|
#1
|
Member
Registered: Nov 2004
Location: Brazil
Distribution: Gentoo
Posts: 363
Rep:
|
Keep track of logs to find suspicious activity
Hi,
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?
Thanks for any help,
|
|
|
03-02-2006, 05:13 PM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
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.
|
|
|
03-04-2006, 05:04 PM
|
#3
|
Member
Registered: Nov 2004
Location: Brazil
Distribution: Gentoo
Posts: 363
Original Poster
Rep:
|
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.
|
|
|
03-04-2006, 06:09 PM
|
#4
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
You can run SSH on any available port with either the ListenAddress directive:
Code:
ListenAddress 10.0.0.1:2000
ListenAddress 10.0.0.1:2001
Or, the Port directive:
Code:
Port 2000
Port 2001
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.
I'm assuming you're using Apache for your http setup, so I'd recommend having a look at http://httpd.apache.org/docs/2.0/mis...rity_tips.html.
|
|
|
All times are GMT -5. The time now is 09:16 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|