Skip to main content
Virusxd512
New Member
January 27, 2020
Question

How to route specific IP to specific protocol on VPN Tunnel

  • January 27, 2020
  • 1 reply
  • 7100 views

Hi,

I need to route a whole subnet to specific IP address Via VPN tunnel.

as an example i have subnet of 10.0.0.1/24 and i want to route All RDP traffic to 192.168.20.21 through VPN tunnel.

 (I already have a stable VPN connection between both ends)

 

Thanks!.

    1 reply

    ShawnZA
    New Member
    January 27, 2020

    Is the 10.0.0.0/24 your local subnet?

    And is there an existing VPN tunnel or do you also need to create the VPN tunnel?

    Virusxd512
    New Member
    January 28, 2020

    @ShawnZA Hi,

    I already have a stable VPN connection.

     

    Thanks!

    ede_pfau
    SuperUser
    SuperUser
    January 28, 2020

    If your VPN is a site-to-site VPN (IPsec of course), the tunnel name already is a virtual interface to which you can route.

    Create a new static route (Network>Static Routes), target network=192.168.20.0/24 (or even smaller like 192.168.20.21/32), interface=tunnel_name, gateway=(leave empty).

     

    This particular setup works for IPsec VPNs, you don't have to specify a gateway address.

    Then you need an outbound policy from LAN to tunnel, and of course the same on the other side.

     

    Note that you cannot route just RDP traffic to the tunnel, and other traffic elsewhere. Wouldn't make much sense anyway.