Static routing in Linux (as a router)Use specific interface for outbound connections (Ubuntu 9.04)linux route...

What does the integral of a function times a function of a random variable represent, conceptually?

What happened to Captain America in Endgame?

Mistake in years of experience in resume?

Is the claim "Employers won't employ people with no 'social media presence'" realistic?

Is it idiomatic to construct against `this`

Dynamic SOQL query relationship with field visibility for Users

What happens to Mjolnir (Thor's hammer) at the end of Endgame?

Why didn't the Space Shuttle bounce back into space as many times as possible so as to lose a lot of kinetic energy up there?

"Hidden" theta-term in Hamiltonian formulation of Yang-Mills theory

What's the polite way to say "I need to urinate"?

"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?

Map of water taps to fill bottles

Contradiction proof for inequality of P and NP?

How to pronounce 'c++' in Spanish

Rivers without rain

Checks user level and limit the data before saving it to mongoDB

A ​Note ​on ​N!

As an international instructor, should I openly talk about my accent?

How can I practically buy stocks?

Was there a Viking Exchange as well as a Columbian one?

How can Republicans who favour free markets, consistently express anger when they don't like the outcome of that choice?

"The cow" OR "a cow" OR "cows" in this context

Retract an already submitted recommendation letter (written for an undergrad student)

How to prevent z-fighting in OpenSCAD?



Static routing in Linux (as a router)


Use specific interface for outbound connections (Ubuntu 9.04)linux route 2nd internal networkselective routing through a VPN tunnel“ip route get” on Ubuntu returning default instead of static routeLinux tun interface packet routingConnecting two clients openvpnMachines disregarding default gatewayHow to correctly set up routing on machine with 4 interfaces so that three of interfaces are on the same subnet?Accessing two isolated subnets from a Linux boxVPN Router does not reply to ARP Requests






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















Currently I have a physical Linux machine (Centos7) with two physical interfaces. On the eth0 interface I have 3 virtual interfaces - eth0.66, eth0,67, eth0.99 (vlan interfaces). wlan0 is the internal WAN uplink. tun0 is created through an SSL Site-to-Site tunnel. I have enabled ipv4 forwarding in the kernel.



As of currently, the default routing tables looks like this:



0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1004 0 0 eth0.66
169.254.0.0 0.0.0.0 255.255.0.0 U 1005 0 0 eth0.67
169.254.0.0 0.0.0.0 255.255.0.0 U 1006 0 0 eth0.99
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
192.168.2.0 192.168.60.65 255.255.255.0 UG 0 0 0 tun0
192.168.6.0 192.168.60.65 255.255.255.0 UG 0 0 0 tun0
192.168.7.1 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.168.7.128 0.0.0.0 255.255.255.192 U 0 0 0 eth0.99
192.168.7.192 0.0.0.0 255.255.255.224 U 0 0 0 eth0.66
192.168.7.224 0.0.0.0 255.255.255.224 U 0 0 0 eth0.67


I am trying to force all traffic from the 192.168.7.224/27 network through the tunnel and use 192.168.7.1 as the default gateway (192.168.7.1 is the GW of the firewall on the server side for the VPN, which I also control).



I've tried to make a new routing table (in etc/iproute2/rt_tables) - and adding the appropriate rules (for now in the runtime and not via a script, but I know how to do this for persistent routing).



from all to 192.168.7.224/27 lookup custom
from 192.168.7.224/27 lookup custom


and then the routing table:



default via 192.168.7.1 dev tun0


at which point, everything breaks... ping stops working, internet on the eth0.67 network fails, etc. How can I get this routing correctly? Probably a stupid question, but does the kernel routing table get completely ignored and do I need to write in all the other routes the SSL VPN is pushing? (the 192.168.2.0 and 6.0 routes are coming from the SSL OPENVPN config).









share





























    0















    Currently I have a physical Linux machine (Centos7) with two physical interfaces. On the eth0 interface I have 3 virtual interfaces - eth0.66, eth0,67, eth0.99 (vlan interfaces). wlan0 is the internal WAN uplink. tun0 is created through an SSL Site-to-Site tunnel. I have enabled ipv4 forwarding in the kernel.



    As of currently, the default routing tables looks like this:



    0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
    169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
    169.254.0.0 0.0.0.0 255.255.0.0 U 1004 0 0 eth0.66
    169.254.0.0 0.0.0.0 255.255.0.0 U 1005 0 0 eth0.67
    169.254.0.0 0.0.0.0 255.255.0.0 U 1006 0 0 eth0.99
    192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
    192.168.2.0 192.168.60.65 255.255.255.0 UG 0 0 0 tun0
    192.168.6.0 192.168.60.65 255.255.255.0 UG 0 0 0 tun0
    192.168.7.1 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
    192.168.7.128 0.0.0.0 255.255.255.192 U 0 0 0 eth0.99
    192.168.7.192 0.0.0.0 255.255.255.224 U 0 0 0 eth0.66
    192.168.7.224 0.0.0.0 255.255.255.224 U 0 0 0 eth0.67


    I am trying to force all traffic from the 192.168.7.224/27 network through the tunnel and use 192.168.7.1 as the default gateway (192.168.7.1 is the GW of the firewall on the server side for the VPN, which I also control).



    I've tried to make a new routing table (in etc/iproute2/rt_tables) - and adding the appropriate rules (for now in the runtime and not via a script, but I know how to do this for persistent routing).



    from all to 192.168.7.224/27 lookup custom
    from 192.168.7.224/27 lookup custom


    and then the routing table:



    default via 192.168.7.1 dev tun0


    at which point, everything breaks... ping stops working, internet on the eth0.67 network fails, etc. How can I get this routing correctly? Probably a stupid question, but does the kernel routing table get completely ignored and do I need to write in all the other routes the SSL VPN is pushing? (the 192.168.2.0 and 6.0 routes are coming from the SSL OPENVPN config).









    share

























      0












      0








      0








      Currently I have a physical Linux machine (Centos7) with two physical interfaces. On the eth0 interface I have 3 virtual interfaces - eth0.66, eth0,67, eth0.99 (vlan interfaces). wlan0 is the internal WAN uplink. tun0 is created through an SSL Site-to-Site tunnel. I have enabled ipv4 forwarding in the kernel.



      As of currently, the default routing tables looks like this:



      0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
      169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
      169.254.0.0 0.0.0.0 255.255.0.0 U 1004 0 0 eth0.66
      169.254.0.0 0.0.0.0 255.255.0.0 U 1005 0 0 eth0.67
      169.254.0.0 0.0.0.0 255.255.0.0 U 1006 0 0 eth0.99
      192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
      192.168.2.0 192.168.60.65 255.255.255.0 UG 0 0 0 tun0
      192.168.6.0 192.168.60.65 255.255.255.0 UG 0 0 0 tun0
      192.168.7.1 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
      192.168.7.128 0.0.0.0 255.255.255.192 U 0 0 0 eth0.99
      192.168.7.192 0.0.0.0 255.255.255.224 U 0 0 0 eth0.66
      192.168.7.224 0.0.0.0 255.255.255.224 U 0 0 0 eth0.67


      I am trying to force all traffic from the 192.168.7.224/27 network through the tunnel and use 192.168.7.1 as the default gateway (192.168.7.1 is the GW of the firewall on the server side for the VPN, which I also control).



      I've tried to make a new routing table (in etc/iproute2/rt_tables) - and adding the appropriate rules (for now in the runtime and not via a script, but I know how to do this for persistent routing).



      from all to 192.168.7.224/27 lookup custom
      from 192.168.7.224/27 lookup custom


      and then the routing table:



      default via 192.168.7.1 dev tun0


      at which point, everything breaks... ping stops working, internet on the eth0.67 network fails, etc. How can I get this routing correctly? Probably a stupid question, but does the kernel routing table get completely ignored and do I need to write in all the other routes the SSL VPN is pushing? (the 192.168.2.0 and 6.0 routes are coming from the SSL OPENVPN config).









      share














      Currently I have a physical Linux machine (Centos7) with two physical interfaces. On the eth0 interface I have 3 virtual interfaces - eth0.66, eth0,67, eth0.99 (vlan interfaces). wlan0 is the internal WAN uplink. tun0 is created through an SSL Site-to-Site tunnel. I have enabled ipv4 forwarding in the kernel.



      As of currently, the default routing tables looks like this:



      0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
      169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
      169.254.0.0 0.0.0.0 255.255.0.0 U 1004 0 0 eth0.66
      169.254.0.0 0.0.0.0 255.255.0.0 U 1005 0 0 eth0.67
      169.254.0.0 0.0.0.0 255.255.0.0 U 1006 0 0 eth0.99
      192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
      192.168.2.0 192.168.60.65 255.255.255.0 UG 0 0 0 tun0
      192.168.6.0 192.168.60.65 255.255.255.0 UG 0 0 0 tun0
      192.168.7.1 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
      192.168.7.128 0.0.0.0 255.255.255.192 U 0 0 0 eth0.99
      192.168.7.192 0.0.0.0 255.255.255.224 U 0 0 0 eth0.66
      192.168.7.224 0.0.0.0 255.255.255.224 U 0 0 0 eth0.67


      I am trying to force all traffic from the 192.168.7.224/27 network through the tunnel and use 192.168.7.1 as the default gateway (192.168.7.1 is the GW of the firewall on the server side for the VPN, which I also control).



      I've tried to make a new routing table (in etc/iproute2/rt_tables) - and adding the appropriate rules (for now in the runtime and not via a script, but I know how to do this for persistent routing).



      from all to 192.168.7.224/27 lookup custom
      from 192.168.7.224/27 lookup custom


      and then the routing table:



      default via 192.168.7.1 dev tun0


      at which point, everything breaks... ping stops working, internet on the eth0.67 network fails, etc. How can I get this routing correctly? Probably a stupid question, but does the kernel routing table get completely ignored and do I need to write in all the other routes the SSL VPN is pushing? (the 192.168.2.0 and 6.0 routes are coming from the SSL OPENVPN config).







      routing static-routes





      share












      share










      share



      share










      asked 7 mins ago









      customcables067customcables067

      337




      337






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "2"
          };
          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f964815%2fstatic-routing-in-linux-as-a-router%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Server Fault!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f964815%2fstatic-routing-in-linux-as-a-router%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

          Українські прізвища Зміст Історичні відомості |...

          Список ссавців Італії Природоохоронні статуси | Список |...