Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Gentoo Internet Router] Basic configuration help
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
emilio_wuerges
n00b
n00b


Joined: 07 Jul 2005
Posts: 6

PostPosted: Mon Mar 15, 2010 8:31 pm    Post subject: [Gentoo Internet Router] Basic configuration help Reply with quote

Hello,
During all my life I only had 1 valid IP address and used the Gentoo Home Router guide to set up my network.
But now I'm in a situation that I have a range of ips xxx.xxx.60.240/255.255.255.192.

So I'm lost. I don't even know how to start.

I want to setup my network so 1 machine will serve as a firewall and DHCP servers.

What should I do? Do you know where I find a nice guide to do it?
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Mon Mar 15, 2010 8:35 pm    Post subject: Reply with quote

Ok, if I understand, you will have a box in front of your lan, and all your box with pass thrue that box.

If so, you will need to use the forward command, so that the trafic can pass from the net, thrue the firewall and end up on your box.

And the same goes for the other direction.
Back to top
View user's profile Send private message
emilio_wuerges
n00b
n00b


Joined: 07 Jul 2005
Posts: 6

PostPosted: Mon Mar 15, 2010 8:57 pm    Post subject: Reply with quote

Hi.
Thanks for the quick reply.

My network setup will be quite simple:

(Internet) -- eth0 -- (linux firewall) -- eth1 -- switch -- (my boxes).

So the configuration you suggest is something like:

iptables -A FORWARD -i eth0 -d *.60.240/26 -j ACCEPT
iptables -A FORWARD -i eth1 -d -j ACCEPT

But what about routing?
What dhcp server should I setup?
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Mar 16, 2010 12:43 am    Post subject: Reply with quote

emilio_wuerges wrote:
But what about routing?


It will depends, because you will at least open port from your firewall to your lan and for routing, you will need to ajust your box so that the default gateway will be for example 192.168.1.1 and that will be the IP adress of your firewall, or the first ip adress that will be available from your range of ip.

And for the dhcp, I don't know, but make sure that your firewall runs a dhcp server, because your router will be not be able to do his normal job.
Back to top
View user's profile Send private message
shazeal
Apprentice
Apprentice


Joined: 03 May 2006
Posts: 208
Location: New Zealand

PostPosted: Tue Mar 16, 2010 2:43 am    Post subject: Reply with quote

http://wiki.archlinux.org/index.php/Simple_stateful_firewall_HOWTO

I used this setting mine up. Just used dnsmasq for DNS/DHCP.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Mar 16, 2010 3:21 am    Post subject: Reply with quote

That's a nice wiki indeed :P
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Mar 16, 2010 3:28 am    Post subject: Reply with quote

I wrote that a wild ago.

You can compare the 2 scripts : http://www.gentoo-quebec.org/wiki/index.php/Utilisation_de_Iptables_pour_d%C3%A9butant
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