Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo router - iptables?
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
groovin
Guru
Guru


Joined: 07 Feb 2004
Posts: 429
Location: California, USA

PostPosted: Thu Apr 08, 2004 10:43 pm    Post subject: Gentoo router - iptables? Reply with quote

i need to setup a gentoo box to act as a router between two private subnets:

192.168.0.0/24---Gentoo box---192.168.1.0/24

every search on linux routing I do brings up iptables.

Is iptables a requirement to run a router? Are there any other requirements (emerge --pretend iptables shows not depends)?

thanks
Back to top
View user's profile Send private message
pathose
Retired Dev
Retired Dev


Joined: 08 Nov 2003
Posts: 35
Location: Ohio, USA

PostPosted: Thu Apr 08, 2004 10:49 pm    Post subject: Reply with quote

iptables are something you compile into your kernel. I'm not sure about what else needs to be emerged, you'll have to dig through the portage tree and get back to us :). Once you have iptables compiled either into your kernel or as a module, you need to write a routing/firewall script. I'd recomend looking into fireHOL; i haven't set this up yet, but this looks like the tool to use. # emerge firehol should do the trick, i'd imagine.
Back to top
View user's profile Send private message
kpack
Tux's lil' helper
Tux's lil' helper


Joined: 29 Mar 2004
Posts: 137

PostPosted: Thu Apr 08, 2004 10:55 pm    Post subject: Reply with quote

IPTABLES has nothing to do with setting up routing.

Do the following:

Make sure routing is configured into your kernel.

Then, enable it:

echo "1" > /proc/sys/net/ipv4/ip_forward

Then read the following documentation:

man route or
man ip

The first one uses the classic route command, the second uses Alexey Kuznetsov's iproute2 tools.

I'm not which Gentoo config file is the right place to store these commands, once you work them out from the command line. Maybe another use knows.
Back to top
View user's profile Send private message
groovin
Guru
Guru


Joined: 07 Feb 2004
Posts: 429
Location: California, USA

PostPosted: Thu Apr 08, 2004 11:36 pm    Post subject: Reply with quote

just got it.

I edited /etc/sysctl.conf and changed

net.ipv4.ip_forward = 0

to

net.ipv4.ip_forward = 1

then i enabled it with

# sysctl net.ipv4.ip_forward=1

and it works. Pretty much the equiv of what you posted kpack.

thanks again for the help everyone!
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