Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
building first iptables firewall ;)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
illvzn
n00b
n00b


Joined: 18 Jan 2003
Posts: 47

PostPosted: Mon May 12, 2003 11:41 pm    Post subject: building first iptables firewall ;) Reply with quote

I need help/resources for building a very simple firewall to secure my workstation.

So far all I can think of needing info on is how to (drop) all packets, except for ones that I request through programs that I'm running... such as, mozilla/konqueror, gaim, tribes2, quake3, ut2k3, irc clients... just common stuff.

If I could get a simple script setup, I could then read some documentation and then add more features... make this a learning process so that if I needed to allow ssh, telnet connections then I would know what to add to my script :D

Any help would be greatly appreciated. I think I'm not very good at googling :P
Back to top
View user's profile Send private message
tod
Developer
Developer


Joined: 17 Apr 2002
Posts: 136
Location: Ozarks, USA

PostPosted: Tue May 13, 2003 5:58 am    Post subject: Reply with quote

A good start would be
http://www-106.ibm.com/developerworks/edu/l-dw-linuxfw-i.html

I would then suggest merging net-firewall/fwbuilder ( it features a druid to get you started quickly).

If you subscribe or have access to Linux Journal at a library, the May and June issues have a pretty good walkthrough of fwbuilder in the Paranoid Penguin section by Mick Bauer.

hth
Back to top
View user's profile Send private message
69link
n00b
n00b


Joined: 18 Apr 2003
Posts: 53
Location: Sweden

PostPosted: Tue May 13, 2003 7:09 am    Post subject: Reply with quote

If you want to build your own script, then I definately recommend reading: http://iptables-tutorial.frozentux.net/

There are some examplescripts there aswell. Building your own iptables-script can be problematic at first, but there are alot of "live" examples out there:
http://www.kurd.nu/
http://www.knowplace.org/netfilter/index.html
http://www.sns.ias.edu/~jns/security/iptables/
Back to top
View user's profile Send private message
petu
Apprentice
Apprentice


Joined: 01 Sep 2002
Posts: 269
Location: Turku, Finland

PostPosted: Tue May 13, 2003 10:47 am    Post subject: Reply with quote

I started making my iptables rules by simply creating these rules:
Code:

iptables -P input drop
iptables -P output drop


Then I watched the console for dropped packages and made holes for the wall as necessary.
_________________
Never be afraid to try something new. Remember, amateurs built the
ark; professionals built the Titanic. -- Anonymous
Back to top
View user's profile Send private message
neilhwatson
l33t
l33t


Joined: 06 Feb 2003
Posts: 719
Location: Canada

PostPosted: Tue May 13, 2003 3:07 pm    Post subject: Reply with quote

petu has the right of it. There is one golden rule to making firewalls regardless of what OS or tools you are using:

Deny everything by default (input, output, and forward). Then turn on only what you need.

It's harder to do but, you are less likely to have unwanted holes.

You can also try www.netfilter.org, the makers of Iptables. Also, O'Reilly has a book Building Internet Firewall that is a great reference on network services and how filter them.
_________________
The true guru is a teacher.
Neil Watson
Back to top
View user's profile Send private message
elykyllek
Tux's lil' helper
Tux's lil' helper


Joined: 16 Sep 2002
Posts: 103
Location: Halifax, Nova Scotia, Canada

PostPosted: Tue May 13, 2003 7:04 pm    Post subject: i used this Reply with quote

looking or using these firewalls would be a good start.
Back to top
View user's profile Send private message
Jimbow
Guru
Guru


Joined: 18 Feb 2003
Posts: 597
Location: Silver City, NM

PostPosted: Tue May 13, 2003 8:17 pm    Post subject: Reply with quote

I have been using rc.firewall from http://projectfiles.com/firewall/

It is a single GPL'ed bash script. It is easy to run and configure and does exactly what you are asking for (plus more if desired). I've been thinking about making an ebuild for it.
_________________
After Perl everything else is just assembly language.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum