Am Montag, 13. August 2001 15:05 schrieben Sie:
Hi
this is somehow offtopic, but nevertheless have a look at route. route add
<gateway> <interface> e.g. to add the subnet 192.168.10.0/24 and route it via eth0 route add -net 192.168.10.0/24 gw 192.168.0.254 eth0 To permanently add routes enter these routes into /etc/route.conf [snip of /etc/route.conf] # # /etc/route.conf # # In this file you can configure your static routing... # # This file is read by /sbin/init.d/route. # # # Destination Dummy/Gateway Netmask Device # # Examples: # # Net devices # 193.141.17.192 0.0.0.0 255.255.255.192 eth0 # # Gateways # default Riemann # 0.0.0.0 193.141.17.193 # # # Host behind Gateway # 193.141.17.142 193.141.17.193 255.255.255.255 # # Net behind a Gateway # 193.141.17.145 193.141.17.193 255.255.255.0 # # Multicast route for e.g. eth0. IP multicasting, forwarding and perhaps # multicast routing in kernel should be enabled. More information will # be found in the NET-3-HOWTO. Most people do NOT need this feature. # # 224.0.0.0 0.0.0.0 240.0.0.0 eth0 # # ISDN (i4l) # 192.168.0.1 0.0.0.0 255.255.255.255 ippp0 # default 192.168.0.1 [/snip]
-----Ursprüngliche Nachricht----- Von: Guido Tschakert [mailto:gt@src-gmbh.de] Gesendet: Montag, 13. August 2001 14:28 An: suse-security@suse.com Betreff: [suse-security] Is it possible to choose the ip adress of packets on a dual homed box?
Hello list,
I have two linux boxes which serves as router with ip-tunneling to connect to subnets. If I do a ssh from one box to the other the ip-Adress of the virtual interface is used, but I wonder if its possible to use the adress of the ethernet interface instead. Or in general: is it possible to tell a dual homed box which ip-Adress it should use instead of taking the ip adress of the interface which is used.
TIA Guido Sorry, I didn't made the question clear enough. I have not a routing problem. Let me give you an example Box 1 ist connected with subnet 192.168.10.0 and has ip 192.168.10.1 And also connected with box2 via isdn/raw-ip 192.168.0.1 Box 2 serves for subnet 192.168.11.0 with ip 192.168.11.1 and has isdn/raw-ip 192.168.0.2. If I make a "ssh 192.168.11.1" from box 1, box 2 tells me that there is a request from 192.168.0.1 but I want that it gets a request from 192.168.10.1 (the ip adress of Box 1 of the "subnet interface")
I don't see the feasibility to solve this problem with routing-rules. Thanx -- ----------------- Guido Tschakert SRC GmbH, SysAd -----------------