[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: virtual router running Debian - add gateway to LAN



El 20/02/14 22:47, motty cruz escribió:
Thank you for your reply,

default gateway for 10.75.0.0/24 <http://10.75.0.0/24> is 10.75.0.1

if I ran the following command on gateway machine (10.5.0.1)

ip route add 10.6.0.0/24 <http://10.6.0.0/24> via 10.5.0.6 dev eth0

any traffic bound for 10.6.0.0/24 <http://10.6.0.0/24> gets re-directed
to 10.5.0.6, but only that machine. I have not configure iptables or
port forwarding. can you point a direction on how to accomplish that step?

Thanks,


On Thu, Feb 20, 2014 at 1:29 PM, Vicios <fernando.vicios@gmail.com
<mailto:fernando.vicios@gmail.com>> wrote:

    El 20/02/14 22:03, motty cruz escribió:

        Hi All,

        I'm new to this list, I want to thank you all for support in
        advance.

        I have a router running Debian with one interface facing public
        and 2nd
        interface to a LAN 10.5.0.0/24 <http://10.5.0.0/24>
        <http://10.5.0.0/24>.

        I have a 2nd router one interface on 10.5.0.0/24
        <http://10.5.0.0/24> <http://10.5.0.0/24>
        and 2nd interface facing another LAN 10.6.0.0/24
        <http://10.6.0.0/24> <http://10.6.0.0/24>.
        So I want 10.5.0.0/24 <http://10.5.0.0/24> <http://10.5.0.0/24>
        to be able to access
        10.6.0.0/24 <http://10.6.0.0/24> <http://10.6.0.0/24>. I did the
        following for a temporary
        work around.

        ip route add 10.6.0.0/24 <http://10.6.0.0/24>
        <http://10.6.0.0/24> via 10.5.0.6 dev eth0


        this works fine but if I log in to another machine in
        10.5.0.0/24 <http://10.5.0.0/24>
        <http://10.5.0.0/24> network, I'm unable to access 10.6.0.0/24
        <http://10.6.0.0/24>
        <http://10.6.0.0/24>


        can you please help? I have Linux 3.2.0-4-686 Debian 3.2

        Thanks in advance!

    Hi!

    What is the default gateway for the network 10.5.X.X? The default
    gateway of 10.5.X.X known the route for the 10.6.X.X network?

    Some iptables rules are applied? Port forwarding has configured?

    Regards. Fernando.


    --
    To UNSUBSCRIBE, email to debian-firewall-REQUEST@lists.__debian.org
    <mailto:debian-firewall-REQUEST@lists.debian.org>
    with a subject of "unsubscribe". Trouble? Contact
    listmaster@lists.debian.org <mailto:listmaster@lists.debian.org>
    Archive: http://lists.debian.org/__530673A4.9000204@gmail.com
    <[🔎] 530673A4.9000204@gmail.com">http://lists.debian.org/[🔎] 530673A4.9000204@gmail.com>


Hi!

You only need configure port forwarding in the default gateway of 10.5.X.X because it is the bridge between boths networks. Clients of boths without routes of the other, send thats packets to the default gateways.

If all is right, both networks are connected and you can use iptables o whatever to filter any traffic or configure NAT between networks.

You can find a lot of information of port forwarding in google[1], for example[2]

Regards. Fernando.

1 - https://www.google.es/search?q=port+forwarding
2 - http://www.ducea.com/2006/08/01/how-to-enable-ip-forwarding-in-linux/


Reply to: