LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   routing advise needed (https://www.linuxquestions.org/questions/linux-networking-3/routing-advise-needed-716314/)

rnbguy 04-02-2009 07:45 AM

routing advise needed
 
hi guys i have this setup:

Machine A ---> external routing device (10.x.x.2) --> external routing device 2 (10.x.x.3) --> Machine B


I want to get from machine A to B via external device1.

The problem is I dont have an ip on that external network, so i figure i can tell iptables to rediect packets from machineA to machineB to go via external device (10.x.x.2) is this possible?

john test 04-02-2009 02:21 PM

Sounds like Machine A has two NICs one going to the internet and the second going to machine B.
Seems to me that NIC 1 should be set up to pull an IP address from the internet and:
NIC 2 should be set up as a DHCP server to provide a private address to Machine B..
Machine B needs to be setup to obtain an IP address automatically.

What is NIC 1 of Machine A connected to? Router/Cable modem?

rnbguy 04-02-2009 03:43 PM

sorry for not explaining this correctly, machine a and b have no link other then through those two remote routers they use as a path. Both machines do not and cannot have a nic with an IP on the same subnet as those machines, hence why i can't simply use "route add" as the network wont be found, hence i want iptables to route all packets going from A to B via those two internal machines (in otherwords have a gateway on a different network)

rnbguy 04-02-2009 04:02 PM

all good we figured out we dont need to do this sorry.

rnbguy 04-02-2009 05:04 PM

come to think of it, im just curious how you'd do it, how can i set gw to be an external ip?


All times are GMT -5. The time now is 07:02 AM.