Re: Linux router howto - not just NAT

From: jack (not_at_all.org)
Date: 12/23/03


Date: Tue, 23 Dec 2003 13:13:29 +0100

Terence Parker wrote:
> Hmm... thanks guys for the replies - I appreciate the help. Perhaps I wasn't
> clear enough though in my first post?
>
> I currently already have a machine that does NAT in the office - taking in
> the line from the ISP on eth0 and then carrying out NAT over the internal
> interface eth1. However, I now want to do more than that.
>
> My ISP has given me a block of several IP addresses - but no router. I will
> plug one network interface into the line direct to the ISP (it's not PPPoE -
> just straight through TCP/IP... it's FTTB here), and then the internal NIC
> will interface with the office switch. I want the linux server configured
> such that for any computer plugged into the switch, it can either grab an
> internal address through DHCP (easy enough - doing that already) - OR the
> user can manually configure a real IP on that computer, and as such that
> would bypass the firewall and everything (though actually, it's still going
> through the linux server, which is simply transparently forwarding real IP's
> to the internal network). This is basically what a router does I gather -
> but I don't have one of those things.
>
> As a bonus - but one thing at a time - I actually have two incoming lines
> from two separate ISP's, each with a block of several IP addresses. Ideally
> I want the said server to connect to both ISP trunks (the PC has three
> NIC's), thus allowing users on the internal network to tap in IP addresses
> from either of the two networks. But i'll worry about that a bit later.
>
> Does this help clear things up a bit?

Well, if that is what You really want to do...

If I get You correctly, You want Your linux box to do firewalling/NAT
for those clients in Your subnet that have private IP addresses. --
You're doing that already, so there's no problem.

Then, You want Your router to simply forward traffic to and from clients
in Your local net that have one of the public IPs.

You can simply do that. With iptables, You should already have a rule
that NATs all traffic from the inside. This rule should have both the
internal interface plus Your local private IP range in it.

Then, simply add one more rule that will only forward IP addresses from
Your public IP block back and forth.

I'm not sure whether this is a good idea at all, but if this is what
You want, I really cannot see where Your problem is.

Anyways, as for the routing, You should tell Your linux router that
both the internal subnet plus Your assigned IP range is available via
Your internal NIC, and all others via Your external one. The clients
must use Your router as the default gateway, no matter which IP they
have. And, the clients themselves must know that Your range of IPs is
local.

Hope this points You into the direction,

Cheers, Jack.

-- 
----------------------------------------------------------------------
My personal reading of the string "MicroSoft" expands to "NanoWeak"...


Relevant Pages

  • Re: Seperate networks using 1 Gateway
    ... function provided by SBS. ... If you remove the NAT router and have ... > clients on this network point straight to the gateway, ...
    (microsoft.public.backoffice.smallbiz2000)
  • Re: Newbie: NAT Entries with DHCP
    ... You have a NAT used for connection to the outside world. ... You have a "router" that connects to the outside world. ... Clients resolve and connect to HTTP sites and FTP sites. ... You can not get internal clients to connect to a service that runs on port ...
    (microsoft.public.windows.server.networking)
  • Re: xp sp2 an 2003er domäne
    ... aber du verschiebst das Problem nur um einen Router weiter ... Wenn er den Clients in seinem Subnetz seinen Rechner als GW eintrag ... Deswegen das NAT. ... Mark Heitbrink - MVP Windows Server ...
    (microsoft.public.de.german.windows.server.networking)
  • Re: Static Translations Disappearing
    ... this router and see if they have the same behavior. ... you are running into a NAT bug. ... It wouldn't hurt to change IOS and ... ....where it just shows all translations being dynamic (0 static, ...
    (comp.dcom.sys.cisco)
  • Re: moved a working network, now it doesnt work
    ... router I can ping the internet with no problem. ... From one of your Linux machines can you ping the FA 0/1 interface (default ... are NOT natting so if CAN ping from the router, ...
    (comp.dcom.sys.cisco)