PPRuNe Forums

Go Back   PPRuNe Forums > Misc. Forums > Computer/Internet Issues & Troubleshooting
Forgotten your Username/Password?


Computer/Internet Issues & Troubleshooting Anyone with questions about the terribly complex world of computers or the internet should try here. We will also try and help with troubleshooting any technical problems you may have with the forums.


Closed Thread
 
Thread Tools
Old 13th Apr 2005, 15:53   #1 (permalink)
 
Join Date: Mar 2004
Location: Bournemouth, UK
Age: 43
Posts: 137
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: Calgary
Posts: 419
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
Probationary PPRuNer
 
Join Date: Sep 2002
Location: Chichester, UK
Posts: 1,663
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)
 
Join Date: Mar 2004
Location: Bournemouth, UK
Age: 43
Posts: 137
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
Probationary PPRuNer
 
Join Date: Sep 2002
Location: Chichester, UK
Posts: 1,663
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: 6,248
Kaspersky
ORAC is offline  
Old 14th Apr 2005, 14:44   #7 (permalink)
Evo
Probationary PPRuNer
 
Join Date: Sep 2002
Location: Chichester, UK
Posts: 1,663
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)
 
Join Date: Mar 2004
Location: Bournemouth, UK
Age: 43
Posts: 137
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
Probationary PPRuNer
 
Join Date: Sep 2002
Location: Chichester, UK
Posts: 1,663
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: 117
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)
 
Join Date: Mar 2004
Location: Bournemouth, UK
Age: 43
Posts: 137
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
Probationary PPRuNer
 
Join Date: Sep 2002
Location: Chichester, UK
Posts: 1,663
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  
 
 
This ad will disappear if you login
Closed Thread
 


Thread Tools


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



All times are GMT. The time now is 01:11.


vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.1
© 1996-2012 The Professional Pilots Rumour Network

As these are anonymous forums the origins of the contributions may be opposite to what may be apparent. In fact the press may use it, or the unscrupulous, or sciolists*, to elicit certain reactions.

*"sciolist"... Noun, archaic. "a person who pretends to be knowledgeable and well informed".