netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Ben Greear <greearb@candelatech.com>, netdev <netdev@vger.kernel.org>
Subject: Re: VRF: ssh port forwarding between non-vrf and vrf interface.
Date: Tue, 26 Jan 2021 10:28:43 -0700	[thread overview]
Message-ID: <9f442307-dd27-7493-3774-4ec72f344003@gmail.com> (raw)
In-Reply-To: <2ce42f10-8884-074e-9992-edd29db22d5d@candelatech.com>

On 1/25/21 8:18 AM, Ben Greear wrote:
> On 1/22/21 8:02 AM, David Ahern wrote:
>> On 1/22/21 8:45 AM, Ben Greear wrote:
>>> Hello,
>>>
>>> I have a system with a management interface that is not in any VRF, and
>>> then I have
>>> a port that *is* in a VRF.  I'd like to be able to set up ssh port
>>> forwarding so that
>>> when I log into the system on the management interface it will
>>> automatically forward to
>>> an IP accessible through the VRF interface.
>>>
>>> Is there a way to do such a thing?
>>>
>>
>> For a while I had a system setup with eth0 in a management VRF and setup
>> to do NAT and port forwarding of incoming ssh connections, redirecting
>> to VMs running in a different namespace. Crossing VRFs with netfilter
>> most likely will not work without some development. You might be able to
>> do it with XDP - rewrite packet headers and redirect. That too might
>> need a bit of development depending on the netdevs involved.
>>
> 
> Maybe easier to improve ssh so that it could specify a netdev to bind to
> when
> making the call to the redirected destination?
> 

maybe. I did not realize this feature made it into ssh, but it has
supported 'rdomains' since 2017 I believe. For Linux rdomain is a VRF.

      reply	other threads:[~2021-01-27 10:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 15:45 VRF: ssh port forwarding between non-vrf and vrf interface Ben Greear
2021-01-22 16:02 ` David Ahern
2021-01-25 15:18   ` Ben Greear
2021-01-26 17:28     ` David Ahern [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f442307-dd27-7493-3774-4ec72f344003@gmail.com \
    --to=dsahern@gmail.com \
    --cc=greearb@candelatech.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).