|
Page 1 of 3 This is part two of "Inbound and outbound routing over multiple internet connections " Any self respecting router not only routes traffic outwards, but of course allows certain services to be hosted and accessed by the "outside" In the case of routers with a single connection, this is fairly simple, but with two internet connections, it gets a bit more complex.
If the service you are hosting is running on the router itself, its quite simple to solve with some additional routing table rules. If however, the service is hosted on another server, then there needs to be some ip rules set in place to handle the request.
So lets tackle these in turn. Im assuming you read the first part of this guide ( Inbound and outbound routing over multiple internet connections ) because its going to build on what we've covered already.
We should already have a single script that does the following:
- Uses IPTABLES to setup the pc as a router and firewall
- Copies the main (and default) routing table to another table called tbr (which uses a secondary internet connection as its default)
- Uses IPTABLES to tag traffic of a certain type
- Defines IP rules to route packets that have been marked over the tbr table
We need to define some tables that cope with what happens when an incoming request it received. Requests coming in on the default connection (internet connection a) should be serviced no problem. Incomming requests coming in on internet connection b however will not be serviced. This is because the request will be recieved, a response sent, but it will send the response by the default connection (interent connection A) the ISP router will probably get it, and discard it because its unknown traffic. So what we need is two tables, one with interent connection a is the default, and another where internet connection b is the default, and some rules to decide when to use them. In theory, we could use the existing Main and tbr tables, but for good orders sake (and that of my sanity) I decided to create two new routing tables. So lets call them inboundA and inboundB.
- InboundA has internet connection A as its default
- InboundB has internet connection B as its default
Before we add these tables, we going to need to assemble some information, namely:
- The name of the interface for each internet connection
- The ip address of the router (the pc we're working on) as the adsl modem sees
- The ip address range between the router (the pc we're working on) and the adsl modem
- The public ip address of the connection
|
|
Last Updated on Wednesday, 09 September 2009 11:06 |