Wikiposts
Search
Computer/Internet Issues & Troubleshooting Anyone with questions about the terribly complex world of computers or the internet should try here. NOT FOR REPORTING ISSUES WITH PPRuNe FORUMS! Please use the subforum "PPRuNe Problems or Queries."

Securing a Linux machine

Thread Tools
 
Search this Thread
 
Old 13th Apr 2005, 15:53
  #1 (permalink)  
Thread Starter
 
Join Date: Mar 2004
Location: Bournemouth, UK
Age: 53
Posts: 133
Likes: 0
Received 0 Likes on 0 Posts
Securing a Linux machine

I have a Linux machine at home and I'm wondering if there is anything I can do to protect the machine against attacks. I have iptables up and running, blocking all ports except 23 (ssh), 80 (http) and a few other, i.e. for Samba. It is open to the internet because it is running a web site. My worry is that I've left a back door open and that a spammer will hijacked my machine to do his dirty deed.

Any hints and tips welcome.

Regards
Stoney
Stoney X is offline  
Old 13th Apr 2005, 17:39
  #2 (permalink)  
 
Join Date: Jul 2002
Location: CYYC
Posts: 410
Likes: 0
Received 0 Likes on 0 Posts
I don't much myself, but you could try LinuxQuestions or maybe the Linux Documentation Project (don't know the link).

goates
goates is offline  
Old 13th Apr 2005, 19:53
  #3 (permalink)  
Evo
 
Join Date: Sep 2002
Location: Chichester, UK
Posts: 1,650
Likes: 0
Received 0 Likes on 0 Posts
The main rules are (a) offer only what you need and (b) keep it patched. If it's running a website then i'd have thought that you'd only need port 80 open externally (i.e. outside any local subnet), possibly ssh if you really need to access it remotely. Why Samba?
Evo is offline  
Old 14th Apr 2005, 12:02
  #4 (permalink)  
Thread Starter
 
Join Date: Mar 2004
Location: Bournemouth, UK
Age: 53
Posts: 133
Likes: 0
Received 0 Likes on 0 Posts
Evo, I use Samba to access the Linux disk from my Windows machine. I have to say it's not the greatest way of connecting but it works well enough that I haven't looked for anything better. Do you recommend something else, i.e. NFS?

Regards
Stoney
Stoney X is offline  
Old 14th Apr 2005, 14:31
  #5 (permalink)  
Evo
 
Join Date: Sep 2002
Location: Chichester, UK
Posts: 1,650
Likes: 0
Received 0 Likes on 0 Posts
No, Samba's fine IMHO - haven't used NFS in years but I remember it being a pain. However, couldn't figure out from your post if Samba's port (139?) was open externally, and if so, why?

I'd only have http and ssh open to non-LAN traffic, and for most purposes it's probably ok not to worry too much about packets from within your own LAN.
Evo is offline  
Old 14th Apr 2005, 14:36
  #6 (permalink)  
Ecce Homo! Loquitur...
 
Join Date: Jul 2000
Location: Peripatetic
Posts: 17,425
Received 1,593 Likes on 730 Posts
Kaspersky
ORAC is online now  
Old 14th Apr 2005, 14:44
  #7 (permalink)  
Evo
 
Join Date: Sep 2002
Location: Chichester, UK
Posts: 1,650
Likes: 0
Received 0 Likes on 0 Posts
ORAC, did you look up the price too? It's probably a bit expensive for what Stoney needs.
Evo is offline  
Old 14th Apr 2005, 15:22
  #8 (permalink)  
Thread Starter
 
Join Date: Mar 2004
Location: Bournemouth, UK
Age: 53
Posts: 133
Likes: 0
Received 0 Likes on 0 Posts
Thanks for the link, ORAC, but it's definitly a bit OTT for my setup.

Evo, I'll have to 'adjust' my iptables a bit. I've got Samba ports (both 137 and 139 for some reason) open to all, i.e. not just the LAN. In fact I have four ports open: http, ssh, mysql and samba. Best I figure out quick how to restrict both mysql and samba to LAN only.

Thanks for the tips.

Regards
Stoney
Stoney X is offline  
Old 14th Apr 2005, 15:27
  #9 (permalink)  
Evo
 
Join Date: Sep 2002
Location: Chichester, UK
Posts: 1,650
Likes: 0
Received 0 Likes on 0 Posts
I haven't used it, but the iptables-HOWTO might help.
Evo is offline  
Old 14th Apr 2005, 21:27
  #10 (permalink)  
 
Join Date: Apr 2002
Location: Forest of Dean
Posts: 199
Received 3 Likes on 1 Post
Locking down your system requires more than using iptables to close ports. I recommend you visit http://www.bastille-linux.org/ and follow the advice there. You can download a perl script which will guide you through the steps you need to take.
izod tester is offline  
Old 15th Apr 2005, 13:27
  #11 (permalink)  
Thread Starter
 
Join Date: Mar 2004
Location: Bournemouth, UK
Age: 53
Posts: 133
Likes: 0
Received 0 Likes on 0 Posts
I'll have to investigate that further, izod tester. I quite fancy the idea of having a hard system

Evo, when I setup my iptables originally I followed an online guide quite similar to your link. I suspect I already know what's required. Drop all incoming except port 22, 80 or from 192.168.etc. Just got to find some time to go over it again.

Regards
Stoney
Stoney X is offline  
Old 15th Apr 2005, 13:59
  #12 (permalink)  
Evo
 
Join Date: Sep 2002
Location: Chichester, UK
Posts: 1,650
Likes: 0
Received 0 Likes on 0 Posts
Stoney, sounds right to me. If you haven't found it already, i've found nmap to be a good tool for testing how successful i've been in restricting services.
Evo is offline  

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.