Hi all,
I'm struggling with a route I'm trying to install on a workstation
(Linux 2.4.22, but I think this is common to other OSes as well).
Assume that the workstation (WS1) sits on network 10.1.1.0/24 and that
there is a gateway (GW1) off this subnet at 10.1.1.1. Also directly
connected to GW1 is subnet 10.1.2.0/24, and in that subnet sits a
firewall (FW1) at 10.1.2.2, with the Internet-at-large the otherside of
it. (Sorry, I don't do ASCII Art, and if you saw my attempts at it,
you'd agree!). Internet routes are not propogated into the internal
network, nor is there a default route injected.
Now, there is an Internet connected host (H1) to which I need to make a
connection from WS1. FW1 has a rule inserted to catch the traffic from
WS1 to H1, Hide-NAT and forward the traffic. This does require that WS1
have a static route to H1 via FW1. This is where I run into
difficulties.
I've tried adding the route like:
WS1# route add -host H1 gw 10.1.2.2
but I get "SIOCADDRT: Network is unreachable" even though 10.1.2.2 is
reachable, by dint of the default route to 10.1.1.1
So, I tried:
WS1# route add -host 10.1.2.2 gw 10.1.1.1
followed by:
WS1# route add -host H1 gw 10.1.2.2
but still "SIOCADDRT: Network is unreachable"
According to the man page for route, "NOTE: The specified gateway must
be reachable first. This usually means that you have to set up a static
route to the gateway beforehand."
ISTM that I've done that, but obviously I'm missing something. Can
anybody point me at what I'm getting wrong, please?
btw, I've tried this from a box in 10.1.2.0, and all works as I expect
(ie I can connect to H1, and the log on FW1 shows the traffic being
NATed and forwarded). As a workaround, I've configured on WS1 a static
route to H1 via GW1, and on GW1 I've configured a static route to H1
via FW1, but this is not acceptable longterm.
Many thanks in anticipation of any help.
Steve
|