Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    All trafic from seperate interface, via OpenVPN client.

    OpenVPN
    2
    5
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wtf1337
      last edited by

      Hello!
      I have a subscription of a VPN service.
      I got the VPN working perfectly and all good, but what i want to do is:
      Only have an seperate network interface where all traffic goes thru the VPN. So the other interfaces will route normal via the WAN interface.

      [2.1-RELEASE][root@pfsense.lan]/var/etc/openvpn(32): cat client1.conf
      dev ovpnc1
      dev-type tun
      tun-ipv6
      dev-node /dev/tun1
      writepid /var/run/openvpn_client1.pid
      #user nobody
      #group nobody
      script-security 3
      daemon
      keepalive 10 60
      ping-timer-rem
      persist-tun
      persist-key
      proto udp
      cipher BF-CBC
      up /usr/local/sbin/ovpn-linkup
      down /usr/local/sbin/ovpn-linkdown
      tls-client
      client
      lport 0
      management /var/etc/openvpn/client1.sock unix
      remote sweden.privateinternetaccess.com 1194
      ca /var/etc/openvpn/client1.ca
      cert /var/etc/openvpn/client1.cert
      key /var/etc/openvpn/client1.key
      comp-lzo
      resolv-retry infinite
      auth-user-pass /etc/openvpn-password.txt
      comp-lzo
      ca /etc/ca.crt
      
      

      TL;DR: Want to route all trafic from a second LAN interface thru the VPN.

      1 Reply Last reply Reply Quote 0
      • P
        phil.davis
        last edited by

        I just commented about this here: https://forum.pfsense.org/index.php?topic=74298.msg406220#msg406220
        Hopefully that will get you going.

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

        1 Reply Last reply Reply Quote 0
        • W
          wtf1337
          last edited by

          This still won't work. I did just as you described in the tread, but the seperate interface still wont go on the internet via the VPN. Nothing will go out on that interface if the OpenVPN client is running.

          1 Reply Last reply Reply Quote 0
          • W
            wtf1337
            last edited by

            http://imgur.com/a/0GmX9

            1 Reply Last reply Reply Quote 0
            • P
              phil.davis
              last edited by

              Manual Outbound NAT needs a ruke on interface VPN. Outbound NAT is applied on the way out, the rules go on the interface/s where the traffic exits.
              Also, the Outbound NAT rule on TESLAN is not needed - it won't break anything, but it will never match anything.

              As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
              If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.