LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-08-2006, 12:42 AM   #1
Thinking
Member
 
Registered: Oct 2003
Posts: 249

Rep: Reputation: 30
need hardcore firewall! gentoo, 2.6.11-gentoo-r3


hiho@ll

somebody got my attention while he showed me that my system isn't really secure ;-)

what i now need/want is:
give me any idea you have which can make a firewall really hardcore!

this means:
think about a system which has no security and many services
anonymous ftp access with write privilege
very simple ssh2 access
samba
apache2
p2p (emule,amule such stuff)

what steps would you do to make this secure?
and please: nothing is too extreme!
i thought about making every service run in a vserver so if it gets hacked its only the vserver!
if it needs programming skills, its not a problem! (i think i will write a log file check, which notifies me at work if it notices a bad guy ;-) )

btw: is it possible to allow ssh access to a vserver if it comes from internet, and allow ssh to the whole machine if it comes from local LAN? (hmm, iptables?)

what i thought:
1. disable ping (iptables)
2. mix the ports (all above 1024) (apache2,p2p,ssh,ftp, samba is only allowed from local net)
3. generate extreme long passwords (and usernames too!! e.g. username: kdur836dk8745kfgndfglkj34578435)
4. very strict access for apache2,ssh,ftp (btw: how can i dissallow root access over ssh? i want to log in as simple user and do "su" do become root)
5. firewall iptables to allow only a few ip's from internet!
6. vserver for every service
7. log file backup
8. i also thought about password rotation! this means i write a prog which changes users passwords depending on a simple algorithm every hour or every day
[EDIT]
9. honey pot (vserver, every standard service running, ssh, ftp (anonymous access))
10. instant messaging system (event driven: on log in notify using ICQ or email (used for honey pot ;-) ))
[/EDIT]

[EDIT]
btw: how does port knocking work? e.g. does it depend only on the server side or needs the client modifications too?
[/EDIT]

hmm, i think that's all for now

thx@ll

Last edited by Thinking; 02-08-2006 at 01:11 AM.
 
Old 02-08-2006, 06:41 AM   #2
Centinul
Member
 
Registered: Jun 2005
Distribution: Gentoo
Posts: 552

Rep: Reputation: 30
I run a Gentoo based firewall and I find it very secure. If you search for IPTables you will find a plethora of information on the internet that is useful. Here are some of the links:

Gentoo Wiki - My Firewall is based of this.
THE IPTables tutorial

Those should contain enough information to get a secure firewall up and running.

4. On my Gentoo machine the ssh config is /etc/ssh/sshd_config. Open that file and go to the line that says PermitRootLogin put a no directly after that. Also in this file you can change the port for which SSH listens on.

As far as port knocking I believe that IPTables can do it without requiring any client modifications but that won't make your system any more secure because it's using different ports. IPTables can automatically re-route based on your conditions but if it does it to every packet then a sniff of port 22 will still result in an attack at your SSH service. I would suggest changing the port and changing the clients as well.

I would write more but I have to go. Good luck and I hope this helps!

Last edited by Centinul; 02-08-2006 at 06:42 AM.
 
Old 02-08-2006, 09:49 AM   #3
Thinking
Member
 
Registered: Oct 2003
Posts: 249

Original Poster
Rep: Reputation: 30
yeah right, didn't thought about this on port knocking

well i think i will do the honeypot stuff too (it shouldn't be a problem, using a vserver, not? so the hacked honeypot can't get out of the sandbox (vserver) right?)
and the icq notification should be simple too
and password rotation is extrem crazy, so its the right stuff for me ;-)
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I start installing stage 3 of gentoo from universal gentoo 2005-1? kazuya1977 Linux - General 1 11-11-2005 10:30 AM
Basic firewall requiredfor Gentoo? vharishankar Linux - Distributions 1 03-07-2005 09:04 PM
pkg-config error with emerge -aD gnome-python on Gentoo 2.6.9-gentoo-r6 ghrellin Linux - Software 2 12-22-2004 06:37 PM
Please help. Gentoo: Emerge gentoo-dev-sources fails sendas4 Linux - Newbie 3 07-19-2004 11:44 AM
Dual boot w/ Gentoo/xp pro vs. gentoo-invalid partition table bobbear Linux - Software 3 02-10-2004 04:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration