Two Networks with Gateway

  • Hello,


    i have installed OMV with 2 Network Cards. with 192.168.20.0/24 with GW 192.168.20.254 and Network B 192.168.178.0/24 with GW 192.168.178.1.


    Is ist possible that Clients from Network B use the GW from this Network?


    I think the traffic goes to the GW from Network A

  • I can answer with yes, but I can not be specific to OMV. The kernel needs support for “policy routing” installed, I don't have the answer for OMV supporting “policy routing”.


    You can read through this, https://kindlund.wordpress.com…-default-routes-in-linux/ and if inspiration strikes... you're good to go.

    OMV 3.0.90 (Erasmus) IBM/Lenovo ThinkServer TS140 - Intel® Xeon® Processor E3-1225 v3
    8M Cache, 3.20 GHz (Quad Core). 32GB PNY Dual Channel 1600MHz DDR3 Memory. PNY CS1311 120GB SSD on OWC Accelsior S PCIe to SSD. 2, 4 Terrabyte Western Digital Reds 2, 8 Terrabyte Western Digital Reds. Intel Gigabyte LAN.

  • Re,


    in the omv-plugins you can find the plugin for altering the krt ... it is called "openmediavault-route" (current v3.1.4 and not from the omv-extras repo).


    Afaik "policy routing" is not needed, just google for "linux iptables forwarding" (and some additions).


    Sc0rp

  • Re,

    Why?

    Because it is fully unclear, which IP-adresse are on the network-cards at the omv-box configured, so i decide to use the "multitool" ... you can masquerade 192-168.178.0/24 fully behind 192.168.20.0/24 without altering any client ... for example.


    Your solution assumes, that 192.168.178.1 is bound to the 2nd NIC of the omv-box ... i think ... but i'm fresh back from vacation.


    Sc0rp

  • Your solution assumes, that 192.168.178.1 is bound to the 2nd NIC of the omv-box

    Why? I would assume 192.168.178.1 is a FritzBox being boss in this network segment and the OMV box has another IP address (most probably above 192.168.178.200 to not conflict with DHCP leases). So given the OMV box has 192.168.178.201 and net.ipv4.ip_forward = 1 is set there then the FritzBox (if still active as DHCP server in the 192.168.178.0/24 segment) should propagate one net route and of course another route for 0.0.0.0 too (no idea whether that works and I won't test on the box where I took the screenshot below right now):


    In case the FritzBox does not allow to propagate a different default gateway than itself either the clients there have to be configured correctly or another box has to provide DHCP services (eg. OMV after learning all the routes but then most probably also interconnecting both subnets. In the example above the clients in 192.168.20.0/24 have no idea how to reach 192.168.178.0/24)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!