<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
  <meta name="Generator" content="Zarafa WebAccess v7.0.9-36358">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>RE: Issue with point to point VPNs behind NAT and asymmetric traffic</title>
  <style type="text/css">
      body
      {
        font-family: Arial, Verdana, Sans-Serif ! important;
        font-size: 12px;
        padding: 5px 5px 5px 5px;
        margin: 0px;
        border-style: none;
        background-color: #ffffff;
      }

      p, ul, li
      {
        margin-top: 0px;
        margin-bottom: 0px;
      }
  </style>
</head>
<body>
<p>Linux by default (regardless of firewall rules) will not accept a packet on an interface when the source of that packet "should" be on another interface according to the current route table (in other words, you're doing asymetric routing).</p><p> </p><p>Easy fix:</p><p> </p><div># Controls source route verification</div><div>net.ipv4.conf.default.rp_filter = 0</div><div># Do not accept source routing</div><div>net.ipv4.conf.default.accept_source_route = 1</div><p> </p><blockquote style="border-left: 2px solid #325FBA; padding-left: 5px;margin-left:5px;">-----Original message-----<br /><strong>From:</strong>    Anurag Bhatia <me@anuragbhatia.com><br /><strong>Sent:</strong> Wed 06-12-2019 04:45 pm<br /><strong>Subject:</strong>        Issue with point to point VPNs behind NAT and asymmetric traffic<br /><strong>To:</strong>    NANOG Mailing List <nanog@nanog.org>; <br /><style type="text/css">body { font-family: monospace; }</style>  <div dir="ltr">Hello everyone, <div> </div><div>Trying to get my head around a certain unexpected behaviour. </div><div> </div><div> </div><div>I am running two site to site VPNs (wireguard now, OpenVPN earlier) between my home and a remote server over two different WAN links. Both WAN links are just consumer connections - one with public IP and one with CGNATed IP. </div><div>The redundancy here is taken care of by the OSPF running via FRR on both ends. </div><div> </div><div> </div><div>The unexpected behaviour I get is that if I set OSPF cost to prefer say link1 between home -> server and prefer link 2 between server -> home then connectivity completely breaks between the routed pools. The point to point IPs stay reachable (which is over expected links i.e symmetric via both ends). As long as both ends prefer link1 or link2, it works fine. At first, I thought it had to do something with NAT but still can't understand how. Since VPN tunnels have a keep-alive timer (for 10 seconds), the tunnel is always up. Any idea why asymmetric packets are being dropped here? </div><div>This exact behaviour was in case of earlier OpenVPN + bird + iBGP and is still the same when I moved everything to Wireguard for VPN + FRR for routing + OSPF. </div><div> </div><div> </div><div> </div><div> </div><div>Thanks. </div><div><br clear="all" /><div> </div>-- <br /><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><font face="arial, helvetica, sans-serif"><br /></font></div><div> </div><font face="arial, helvetica, sans-serif">Anurag Bhatia<br /></font><div> </div><div><font face="arial, helvetica, sans-serif"><a href="http://anuragbhatia.com" target="_blank" title="This external link will open in a new window">anuragbhatia.com</a></font></div></div></div></div></div></div></div></div>   </blockquote>
</body>
</html>