OpenVPN client with two NICs: VPN traffic through eth1, LAN traffic through eth0

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I have a headless machine running Ubuntu 16.04 LTS with two network cards. Both cards have LAN (and WAN) access. I would like to connect to an OpenVPN server (which lets other clients to talk to each other) so that the tunnel goes through eth1. This way, my machine would be reachable by other machines on the 192.168.0.X LAN via eth0, and by the other VPN clients in the 10.8.0.Y network over eth1. Something like this:



LAN: 192.168.0.X <--> [eth0][my machine][eth1] <- VPN 10.8.0.Y -> other VPN clients



There is no need for the other machines on the 192.168.0.X LAN to reach the VPN clients, in other words, "my machine" does not have to be a bridge. It just has to be reachable from both networks. How can this be done (from the command line)?










share|improve this question

























    up vote
    0
    down vote

    favorite












    I have a headless machine running Ubuntu 16.04 LTS with two network cards. Both cards have LAN (and WAN) access. I would like to connect to an OpenVPN server (which lets other clients to talk to each other) so that the tunnel goes through eth1. This way, my machine would be reachable by other machines on the 192.168.0.X LAN via eth0, and by the other VPN clients in the 10.8.0.Y network over eth1. Something like this:



    LAN: 192.168.0.X <--> [eth0][my machine][eth1] <- VPN 10.8.0.Y -> other VPN clients



    There is no need for the other machines on the 192.168.0.X LAN to reach the VPN clients, in other words, "my machine" does not have to be a bridge. It just has to be reachable from both networks. How can this be done (from the command line)?










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a headless machine running Ubuntu 16.04 LTS with two network cards. Both cards have LAN (and WAN) access. I would like to connect to an OpenVPN server (which lets other clients to talk to each other) so that the tunnel goes through eth1. This way, my machine would be reachable by other machines on the 192.168.0.X LAN via eth0, and by the other VPN clients in the 10.8.0.Y network over eth1. Something like this:



      LAN: 192.168.0.X <--> [eth0][my machine][eth1] <- VPN 10.8.0.Y -> other VPN clients



      There is no need for the other machines on the 192.168.0.X LAN to reach the VPN clients, in other words, "my machine" does not have to be a bridge. It just has to be reachable from both networks. How can this be done (from the command line)?










      share|improve this question













      I have a headless machine running Ubuntu 16.04 LTS with two network cards. Both cards have LAN (and WAN) access. I would like to connect to an OpenVPN server (which lets other clients to talk to each other) so that the tunnel goes through eth1. This way, my machine would be reachable by other machines on the 192.168.0.X LAN via eth0, and by the other VPN clients in the 10.8.0.Y network over eth1. Something like this:



      LAN: 192.168.0.X <--> [eth0][my machine][eth1] <- VPN 10.8.0.Y -> other VPN clients



      There is no need for the other machines on the 192.168.0.X LAN to reach the VPN clients, in other words, "my machine" does not have to be a bridge. It just has to be reachable from both networks. How can this be done (from the command line)?







      networking openvpn






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 1 at 9:36









      Laryx Decidua

      1064




      1064

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1002025%2fopenvpn-client-with-two-nics-vpn-traffic-through-eth1-lan-traffic-through-eth0%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1002025%2fopenvpn-client-with-two-nics-vpn-traffic-through-eth1-lan-traffic-through-eth0%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491