Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
College Network
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
jbstew32
n00b
n00b


Joined: 12 Jul 2003
Posts: 18
Location: Atlanta, GA

PostPosted: Sat Aug 02, 2003 5:39 pm    Post subject: College Network Reply with quote

I will be on a college network for sometime with my linux box What are some security measures that I could take to prevent "browsers" or script kiddies from screwing with me, aside from turning off services and the basic hosts.deny and such? Is there a website any of you know of that has a good howto on firewalls/iptables?
Back to top
View user's profile Send private message
fragbert
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2003
Posts: 75
Location: Dallas, TX

PostPosted: Sat Aug 02, 2003 7:19 pm    Post subject: Reply with quote

The www.netfilter.org site has a lot of good information and FAQ's. If all you want to do is firewall yourself from remote users, this will give you a good start:

Code:
iptables -P INPUT DROP
iptables -A INPUT -i lo -j ACCEPT
echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter


I'll explain the code line by line:
First, it sets the default INPUT policy to DROP (all packets not otherwise matching a rule will be dropped)
Next, it accepts packets coming into the local loopback interface. This is useful if you run program that connect to local network sockets
And finally it turns on reverse path filtering. This will prevent people from exploiting the loopback interface's accept policy by checking to make sure that all packets come from the interface they would leave on.

Assuming that you have no other iptables rules, and that you don't have forwarding on (the default), you should be safe. If you want these settings to come up on every boot, you need to do three things: execute '/etc/init.d/iptables save' to save the settings, run 'rc-update add iptables default', and put the rp_filter setting in your /etc/sysctl.conf:

Code:
net.ipv4.conf.all.rp_filter = 1


Good luck,



Michael
Back to top
View user's profile Send private message
zeky
Guru
Guru


Joined: 24 Feb 2003
Posts: 470
Location: Vukojebina, Europe

PostPosted: Sat Aug 02, 2003 7:44 pm    Post subject: Reply with quote

Here's a link to get you started:

http://www.sns.ias.edu/~jns/security/iptables/rules.html
_________________
Beat your dick like it owes you money
Back to top
View user's profile Send private message
dma
Guru
Guru


Joined: 31 Jan 2003
Posts: 437
Location: Charlotte, NC, USA

PostPosted: Sun Aug 03, 2003 1:45 am    Post subject: Reply with quote

This has almost everything you want (very well-written in my opinion, but buried back in the docs section):

Gentoo Linux Security Guide
Back to top
View user's profile Send private message
Spida
Tux's lil' helper
Tux's lil' helper


Joined: 08 Feb 2003
Posts: 97
Location: Germany

PostPosted: Sun Aug 03, 2003 1:56 pm    Post subject: Reply with quote

You may want to have a look at the Gentoo-Server-Pages
Back to top
View user's profile Send private message
Kalmairn
n00b
n00b


Joined: 27 Jan 2003
Posts: 61

PostPosted: Sun Aug 03, 2003 3:27 pm    Post subject: Reply with quote

fragbert wrote:
The www.netfilter.org site has a lot of good information and FAQ's. If all you want to do is firewall yourself from remote users, this will give you a good start:

Code:
iptables -P INPUT DROP
iptables -A INPUT -i lo -j ACCEPT
echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter


Don't forget to have:

Code:
iptables -A INPUT -m state --state ESTABLISHED -j ACCEPT


Otherwise the traffic you requested from the outside world will be nailed by the default policy of the INPUT chain.

Kal.
Back to top
View user's profile Send private message
fragbert
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2003
Posts: 75
Location: Dallas, TX

PostPosted: Sun Aug 03, 2003 5:46 pm    Post subject: Reply with quote

Kalmairn wrote:
Code:
iptables -A INPUT -m state --state ESTABLISHED -j ACCEPT


Otherwise the traffic you requested from the outside world will be nailed by the default policy of the INPUT chain.

Kal.


Doh, yeah that would be an important one I left out. :oops: Usually people will do '-m state --state ESTABLISHED,RELATED'. RELATED will help assist with opening ports which are related to already opened connections (like in FTP, etc).



Michael
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