Hello all. First post here.
For quite awhile I have been using an old Linksys WRT54G2 router. I use DHCP to my ISP and get back a static public IP (69.69.169.95). My ISP also gives me an 8 IP subnet (167.70.99.80/29) which routes through the static address. I am able to use this subnet of public IPs because my WRT54G2 has a "router mode" (as opposed to just NAT'ing in gateway mode.)
I've set the LAN-side IP of the Linksys router to 167.70.99.81. Here is the route table as it appears on the WRT54G2 router. (I don't add the entries, they just "magically" appear when I get the static address from my ISP):
Code:
Dest LAN IP Subnet Mask Gateway IF
0.0.0.0 0.0.0.0 69.69.169.1 WAN
69.69.169.0 255.255.255.0 69.69.169.95 WAN
167.70.99.80 255.255.255.248 167.70.99.81 LAN
This works great for my home devices which are all behind a Linux box NAT'ing and firewalling on one of the public IPs in the 167 subnet as well as any other systems to which I assign a static 167.70.99.x address (in what I suppose would qualify as a DMZ.)
I am now trying to replace that router with a Linux box but I'm really struggling getting the route table right. For the new Linux system I'm using a minimal install of CentOS 6.3. on a box with four NICs. One for WAN (eth3), one for DMZ (eth1) where I'll put my 167.70.99.x servers and a couple extra unused NICs at this time. I think I need a router IP address like the Linksys so I've set eth1 to 167.70.99.81 and manually added a route entry like this:
Code:
route add -net 167.70.99.80/29 gw 167.70.99.81
I suspect this isn't the right thing to do since when I hook up to the ISP my route table looks like this:
Code:
Dest LAN IP Gateway Genmask Flags IF
167.70.99.80 167-70-99-81.ip 255.255.255.248 UG eth1
167.70.99.80 * 255.255.255.248 U eth1
69.69.169.0 * 255.255.255.0 U eth3
default 69.69.169.1 0.0.0.0 UG eth3
Devices on 167.70.99.x don't get out. What do those dashes and the ".ip" mean on the eth1 entry? How do I get the Linux box to emulate to Linksys router by routing to the subnet? What should the eth1 configuration look like?
Thanks for any suggestions.