Gentoo Archives: gentoo-user

From: Dave Nebinger <dnebinger@××××.com>
To: gentoo-user@l.g.o
Subject: RE: [gentoo-user] making my own router
Date: Fri, 07 Oct 2005 13:33:40
Message-Id: 001301c5cb43$4e8dcb50$4501010a@jnetlab.lcl
In Reply to: [gentoo-user] making my own router by Mark
1 > Sound OK so far?
2
3 Yup, same setup I'm using (kinda). Works out very well.
4
5 > Next steps I think are figuring out how to provide DHCP
6 > to both internal subnets from the same Gentoo box, and
7 > what gateway address(es) the clients should use.
8
9 The gentoo box is the gateway. Assuming it is 192.168.{0,1}.1,
10 that would be the address to feed to the internal network boxen.
11
12 DHCP is easily configured to serve based upon the card, you just
13 need to dig into the config file to get it set up. Don't forget
14 to add iptables rules to block DHCP traffic coming or going on
15 the card connected to the network; you don't want to offer DHCP
16 to anyone outside of your internal network.
17
18 Along with DHCP you might want to add a caching DNS proxy on the
19 gateway box. This will simplify the network settings of the
20 internal systems (everything network-related would point to the
21 gateway).
22
23 > Finally, I need to be able to do port-forwarding from the
24 > outside to a specific host on one of the internal subnets.
25 > Can I do that?
26
27 Yes, it's all done via iptables. You'll need to chain it up; the
28 cable modem forwards to the firewall which forwards to the gentoo
29 box which forwards to the specific host. You'll have to get all
30 of the DNAT stuff right along the way.
31
32 > One quandary I have is regarding the hardware firewall. We have
33 > money invested in it, but does it buy me anything now that we are
34 > creating the 2 separate subnets? Should I just sell it and let
35 > the Gentoo box be the firewall as well?
36
37 As one poster said it will offer another layer of protection, but...
38
39 Personally I found it unwieldy to maintain iptables rules in such a
40 fashion. If traffic can't get to/from a destination you'll have like
41 5 points of failure: the local box, the switch, the gentoo box, the
42 firewall, and finally the cable modem.
43
44 And with the correct iptables rules in place your gentoo box will
45 be just as secure as the firewall appliance. It also offers you the
46 opportunity to see all incoming traffic, not just the traffic the
47 firewall appliance allows. So, for example, I have the ssh port open
48 on the gentoo box but it is basically a honey pot; folks trying to
49 connect there get automatically added to the blacklist and traffic
50 is blocked from them permanently.
51
52 I'm not sure how feature-full your firewall appliance is, but the ones
53 that I was using had limited port forwarding capabilities (10 to be
54 exact). Once I wanted to start hosting basic services, I quickly
55 consumed those ports (imap, pop3, ssh, ident, smtp, ftp, http/s, ...).
56
57 This however might not be a problem for you.
58
59
60 --
61 gentoo-user@g.o mailing list