On Thu, 15 Apr 2004 19:04:15 +0200, Wolf Grossi <ng-(E-Mail Removed)> wrote:
> Hi folks,
>
> This is certainly a beginners problem - and I cannot solve it:
> the System is a linux 2.4.18, magro1.magro 200.0.0.140
> I have permission to login to server SERV1 ip 200.1.1.1
> There is a subnet behind SERV1 87.0.0.0
> I want to access SUBSERV 87.0.0.40
>
> isp-gateway and both servers have an entry in /etc/hosts
> eth0 is the local device, eth1 the external.
>
> on my machine i have the following routing:
> Destination Gateway Genmask Flags Met Ref Use Iface
> isp-gateway * 255.255.255.255 UH 0 0 0 eth1
> 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
> default isp-gateway 0.0.0.0 UG 0 0 0 eth1
>
> now I add the desired routes:
> route add -host SERV1 eth1
> route add -net 87.0.0.0 netmask 255.255.255.0 gw SERV1
>
> resulting in
> Destination Gateway Genmask Flags Met Ref Use Iface
> SERV1 * 255.255.255.255 UH 0 0 0 eth1
> isp-gateway * 255.255.255.255 UH 0 0 0 eth1
> 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
> 87.0.0.0 SERV1 255.255.255.0 UG 0 0 0 eth1
> default isp-gateway 0.0.0.0 UG 0 0 0 eth1
>
> this makes SERV1 unavailable:
A gateway has to be a directly connected remote IP (one that shows up in
'/sbin/arp -a' after you have used it). You are telling Linux that SERV1
is locally connected to eth1. If it is not, then that is the reason it
becomes unreachable and pointless to use as a gateway.
If for some reason public IP 87.0.0.40 is not reachable through normal
internet routing and only from SERV1, either admin of SERV1 would have to
forward in the port(s) you need, or you would have to tunnel to SERV1. One
possiblity is ssh using TCP port forwarding (which can be done without
root access to SERV1), or with a VPN (which root would have to configure
on destination).
For example I have used ssh to connect to our company mail server (without
root access) and forward ports to enable me to connect to things on
private LAN (intranet web server, HP3000 computer, JetDirect at our
office, etc.)
--
David Efflandt - All spam ignored
http://www.de-srv.com/