How make linux box secure.

Protecting your Linux box
Post Reply
azfar
Captain
Posts: 598
Joined: Tue Mar 23, 2004 1:16 am
Location: Karachi
Contact:

How make linux box secure.

Post by azfar »

I am running Fedora Core 3 on my production server which hold http cache i-e I am running squid on it. Now I want to make this box as much secure as I can. For that I installed latest squid stable version. Install latest kernel version, stop few unneccessary services. Now I want to implement some kind of firewall on it i-e blocking malicious ports via iptables.
I am currently only running Squid and SSH on it, in future may be Appache but on different port and Bind.
Azfar Hashmi
Email : azfarhashmi@hotmail.com
Anjum Butt
Company Havaldaar Major
Posts: 165
Joined: Mon Jun 09, 2003 9:02 am
Location: Karachi

Post by Anjum Butt »

The best way to secure a box is to put it behind a firewall.
That is something like this



A-------------B------------C


Where,
A is linux box
B is gateway firewall
C is the outside world

This way if there is some sort of breakin, the only thing they can come upto will be the gateway/firewall.

You can use the a small box such as a P1 100mhz with 64Mb ram to do it.
or even a 386 with 8mb ram.

If you put up a 100mhz pc for firewall, use IPCop. www.ipcop.org


Otherwise use the utilities provided by the FC3.
More will follow :)

Anjum Butt
Registered Linux User #314299
mhassan
Lance Naik
Posts: 41
Joined: Thu Dec 23, 2004 1:28 pm
Location: lahore
Contact:

secure Linux box

Post by mhassan »

Dear

Security comes thru assurance and responsibility. Fedora is not mend for commmercial deployments but for experiments and usage. For commercial and critical secure packed scenarios redhat has launched another family known as RedHat Enterprise Linux and in the Pakistan OpenTech is the redhat's master products and training partner.

Opentech
111-733-428
Lahore/Karachi

Regards .
Best Regards
Linux to All
nasacis
Battalion Havaldaar Major
Posts: 269
Joined: Sat Dec 13, 2003 3:58 pm
Location: Faisalabad
Contact:

Post by nasacis »

i think it does't matter that we are using experimental or enterprise OS
Nafees Ahmed
Cell: +92.300.8653568
UAN: 041-111432432
Nexlinx Faisalabad
www.nexlinx.net.pk
nafees29@gmail.com
nasacis
Battalion Havaldaar Major
Posts: 269
Joined: Sat Dec 13, 2003 3:58 pm
Location: Faisalabad
Contact:

Post by nasacis »

check below url for securing linux box
http://www.ibiblio.org/pub/Linux/docs/H ... HOWTO.html
Nafees Ahmed
Cell: +92.300.8653568
UAN: 041-111432432
Nexlinx Faisalabad
www.nexlinx.net.pk
nafees29@gmail.com
gnome
Lance Naik
Posts: 36
Joined: Mon Sep 27, 2004 5:56 am

Post by gnome »

Anjum Butt wrote:The best way to secure a box is to put it behind a firewall.
That is something like this



A-------------B------------C


Where,
A is linux box
B is gateway firewall
C is the outside world

This way if there is some sort of breakin, the only thing they can come upto will be the gateway/firewall.

You can use the a small box such as a P1 100mhz with 64Mb ram to do it.
or even a 386 with 8mb ram.

If you put up a 100mhz pc for firewall, use IPCop. www.ipcop.org


Otherwise use the utilities provided by the FC3.
correct me if i am wrong..

but even if the attacker breaks in and gets to the firewall, don't you think he'd be able to compromise the 'secure' box from/through the firewall as well?..
i mean if the attacker is smart enough, he'd know whether he has compromised the 'secure' box or the firewall.
Anjum Butt
Company Havaldaar Major
Posts: 165
Joined: Mon Jun 09, 2003 9:02 am
Location: Karachi

Post by Anjum Butt »

Technically, there is no security against an intended attacker.

However, there are two reasons i recomeneded ipcop as firewall.
This project is known for its security.

1. It doesn't have anything more than what is actually required on firewall.
This rules out the possibility of an attacker gaining a remote shell like telnet or ssh.

2. Even if it gets compromised, an attacker wont be able to do much since its only a linux firewall, not a linux distro which u can use to do some work.
More will follow :)

Anjum Butt
Registered Linux User #314299
drlinux
Lance Naik
Posts: 23
Joined: Wed Dec 29, 2004 11:58 pm
Contact:

Post by drlinux »

hey ! I think u should read "Running Linux 4th Edition" you will really find the security solutions.......
tt83x
Cadet
Posts: 7
Joined: Thu Feb 12, 2004 10:25 pm

try out Bastille

Post by tt83x »

try out Bastille

http://www.bastille-linux.org/

it has an EXCELLENT step by step process of hardening the system with real explanation abt the steps ...
mahin
Major
Posts: 605
Joined: Wed Aug 07, 2002 8:00 pm
Location: Karachi
Contact:

Post by mahin »

Reading is not enough :) implement it.

Go for IP Cop then move over to any thing you wish. It.s downloads corossed million mark long ago, being GPL it is difficult to figure the actual numbers. Try Google for security issues or reported break-in / security breach incidents involving IP Cop, do it only to give you the confidence.

If you need a Server then always use Firewall no matter what distro you choose.

If you can afford to pay $ 1499.00 + more [ dont ever think of using pirated copy no matter what this is going to get you in trouble - go for GPL if you can not afford to pay ] then for a lot less [ even free :) ] you have more options.

If you know what you want then Fedora will work just fine but you need a dedicated Firewall..
zaeemarshad
Lieutenant Colonel
Posts: 660
Joined: Sat Jul 06, 2002 12:35 pm
Location: Islamabad
Contact:

Post by zaeemarshad »

If you seriously want to secure your network, then you will have to read up a lot on different aspects of network security, breaches etc. Using a distro like IPCop can give you an idea about security but on systems where you need to secure full fledge linux servers, you need to understand the tools available, how to use them and network perimeter security.

Regards
Zaeem
drlinux
Lance Naik
Posts: 23
Joined: Wed Dec 29, 2004 11:58 pm
Contact:

Post by drlinux »

hello,
mahin wrote:Reading is not enough :) implement it.
If you donot read how can you implement.. :D One can not implement until he has no knowledge about what he is doing 8)
gnome
Lance Naik
Posts: 36
Joined: Mon Sep 27, 2004 5:56 am

Post by gnome »

Anjum Butt wrote:Technically, there is no security against an intended attacker.

However, there are two reasons i recomeneded ipcop as firewall.
This project is known for its security.

1. It doesn't have anything more than what is actually required on firewall.
This rules out the possibility of an attacker gaining a remote shell like telnet or ssh.

2. Even if it gets compromised, an attacker wont be able to do much since its only a linux firewall, not a linux distro which u can use to do some work.
forgive me for not following up on this thread
i have some questions, hope you can help me out

if an attacker compromises the firewall, wouldn't he be able to run a ssh server on it by getting it thru wget?

pardon me for sounding naive but i haven't actually ever used IPCop so i'm rather curious.
fawad
Site Admin
Posts: 918
Joined: Wed Aug 07, 2002 8:00 pm
Location: Addison, IL
Contact:

Post by fawad »

gnome, what mahin was trying to say was that IPCop is a specialized distro created for the sole purpose of shuffling packets around. It does ship with an sshd, but remote (non-LAN) access to it is disabled by default. Their CGI pages are written with perl taint mode enabled. So, it makes it dead simple to make a locked down firewall. In my installations, I enable remote access to the admin pages, but it is disabled by default. Additionally, the ipcop guys have taken a lot of measures to protect against breakins including not even installing ssh client. So your weakest link is probably the administrative passwords.

Only thing they could do better in my opinion is to create a tight selinux policy for the box.
gnome
Lance Naik
Posts: 36
Joined: Mon Sep 27, 2004 5:56 am

Post by gnome »

fawad wrote:gnome, what mahin was trying to say was that IPCop is a specialized distro created for the sole purpose of shuffling packets around. It does ship with an sshd, but remote (non-LAN) access to it is disabled by default. Their CGI pages are written with perl taint mode enabled. So, it makes it dead simple to make a locked down firewall. In my installations, I enable remote access to the admin pages, but it is disabled by default. Additionally, the ipcop guys have taken a lot of measures to protect against breakins including not even installing ssh client. So your weakest link is probably the administrative passwords.

Only thing they could do better in my opinion is to create a tight selinux policy for the box.
okay that was a better explanation

thanks
Post Reply