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

    HOWTO: Pfsense 2.0.1 - OpenVPN Site 2 MultiSite PKI

    OpenVPN
    10
    17
    27.4k
    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.
    • T
      tweezy619
      last edited by

      ok… so the server is issuing a private ip from the tunnel and the client shows that it's connect. but i can't ping either side from either device. what am i missing?

      1 Reply Last reply Reply Quote 0
      • T
        tassos
        last edited by

        started the detailed process you specify

        swap tcp/ip addresses as follows:

        SERVER SIDE: 192.168.1.0/24 <========> 10.0.8.0/24 <========> CLIENT SIDE: 192.168.2.0/24
        –-----------------------------------------------------------------------------------------
        SERVER SIDE:    10.1.1.0/24 <========> 10.0.8.0/24 <========> CLIENT SIDE: 10.1.12.0/24

        replaced the user name from client1 to tassos

        Tab Certificates
        Create an User "client" Certificate (+ sign)

        run into the previously mentioned by tweezy619 problem:

        Method: Create an internal Certificate
        Descriptive name: client1
        Certificate authority: client1
        Key length: 2048 bits
        Certificate Type: User Certificate
        Lifetime: 3650 days
        Country Code: {xx}
        State of Province: {xx}
        City: {xx}
        Organisation: {xx}
        Email Address: {xx@xx.xx}
        Common Name: client1

        it does not give me an option to edit the cert auth. it only defaults to internal-ca.

        and finally stuck in step

        CLIENT: ++Step Four Import Certificates (CA, User Certificate)++

        System/Cert Mananger

        Tab CAs
        Import an Certificate Authorithy (+ sign)
        Descriptive name: internal-ca
        Method: Importing an existing Certificate Authorithy
        Certificate data: copy/paste this from the exported internal-ca.crt (open with notepad)

        Click Save.

        by clicking Save I get "This certificate does not appear to be valid."

        user tweezy619 found the solution in Firewall Rules that needed to turn to UDP

        how to do that ? any suggestion would be really helpful.

        1 Reply Last reply Reply Quote 0
        • L
          lelik67
          last edited by

          Quick question: if behind client1 is windows network with it's own dns server (not pfsense box), is it possible to push dns server ip to server1  and enable NetBIOS over TCP/IP, so that people from sever1 network could browse computers on client1 windows network.

          1 Reply Last reply Reply Quote 0
          • J
            josemaX
            last edited by

            Hello

            I followed this and i have my Site2Site running, but have a problem i'm unable to resolve.

            I can access from the client side the server side, but from server side to client computers (not even ping).

            I've checked the rules, etc… and don't find the solution.

            If i ssh from server side to client side OpenVPN IP (10.0.10.6) i get an ssh session from a server's side computer into client side pfSense box, so it's working but can't access LAN.

            Anyone knows what i am missing?

            TIA

            Best

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

              On the server side, does pfSense have a route to the client LAN (Diagnostics->Routes)?
              What happens when you traceroute to a client LAN device? Where do the responses stop?
              Is the client-end pfSense the main router for the client LAN? (If yes, then the clients should have it as their default gateway and should work. If no, then the clients need to know the route back, or the main client router needs to know the route to the pfSense.}
              Does the client pfSense have firewall rule/s on OpenVPN allowing the incoming traffic?
              Do the LAN clients have a firewall preventing ping/traceroute?
              If you are really stuck finding the error, post OpenVPN configs and rules and details of what the client machines are. Someone can spot the missing piece of the puzzle…

              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
              • J
                josemaX
                last edited by

                Hello Phil, thanks for your answer, below are the replies
                @phil.davis:

                On the server side, does pfSense have a route to the client LAN (Diagnostics->Routes)?

                ~~No, i don't see it in the server side, but yes in the client side, i think is the one that says:

                Dest: 172.16.0.0/21 - Gw: 10.0.10.5 - UGS - 0 - 320 - 1500 - Netif: ovpnc1

                Really? How i get the one in the server side?~~

                UPDATE:

                I got the route in the server side by changing the Advanced configuration to this format:

                route 192.168.235.0 255.255.255.0;push "route 172.16.0.0 255.255.248.0";

                As i found in: http://forum.pfsense.org/index.php/topic,12888.0.html

                I have

                Dest: 192.168.235.0/24 - Gw: 10.0.10.2 - UGS - 0 - 0 - 1500 - Netif: ovpns1

                But still no ping or connectivity from server to client side.

                What happens when you traceroute to a client LAN device? Where do the responses stop?

                This: it goes nowhere…

                traceroute 192.168.235.150

                traceroute to 192.168.235.150 (192.168.235.150), 30 hops max, 60 byte packets
                1  * * *
                2  * * *
                [Trimmed….]
                29  * * *
                30  * * *

                Is the client-end pfSense the main router for the client LAN? (If yes, then the clients should have it as their default gateway and should work. If no, then the clients need to know the route back, or the main client router needs to know the route to the pfSense.}

                Yes, it is

                Does the client pfSense have firewall rule/s on OpenVPN allowing the incoming traffic?

                Yes on OpenVPN Tab an accept rule:

                Pass / Not disabled /OpenVPN / Proto: Any / Source: Any / Dest: Any

                Do the LAN clients have a firewall preventing ping/traceroute?

                I think no because i can ping them from the client's side pfSense shell, also i ran a network scan from the server side to the client subnet with Nmap and found nothing. Also i know there are some computers with services opened (MySQL, RDP, etc…) that are not accesible from server side.

                If you are really stuck finding the error, post OpenVPN configs and rules and details of what the client machines are. Someone can spot the missing piece of the puzzle…

                If you think it's necesary with the info i wrote before i can collect it, of course…

                Thanks again,

                Best,

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

                  The traceroute should at least get a 1st hop reply from its local (server-side) pfSense.
                  Can you traceroute to 10.0.10.2 (client end of OpenVPN link)?
                  Maybe there is a firewall rule on the server-side pfSense LAN that is blocking traffic to the client-side LAN (192.168.235.0/24)?

                  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
                  • J
                    josemaX
                    last edited by

                    @phil.davis:

                    The traceroute should at least get a 1st hop reply from its local (server-side) pfSense.
                    Can you traceroute to 10.0.10.2 (client end of OpenVPN link)?
                    Maybe there is a firewall rule on the server-side pfSense LAN that is blocking traffic to the client-side LAN (192.168.235.0/24)?

                    Hello

                    Thanks to your post i've solved it. I explain how and perhaps it helps some one or you can tell me the right solution if i am wrong.

                    I reviewed my LAN rules and "noted" the last is the one that permits traffic (before there are some limiters, etc…), BUT i have a failover balancer (3 providers, WAN, OPT1 and OPT2).

                    Proto: * / Src: LAN / Port: * / Dst: * / GW: FailoverWANOPT1OPT2

                    I Guessed this was a problem, so i created a rule at the very top that says:

                    Proto: * / Src: LAN / Port: * / Dst: 192.168.235.0/24 / GW: *

                    After this, it works!

                    Is this the right solution or there is another one?

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

                      Yes, the policy routing to a gateway group was explicitly directing general traffic to the WAN links in the gateway group. The ping to the OpenVPN tunnel remote end worked because it is seen as a locally-connected subnet, and so can is delivered directly without the policy-routing rule getting a chance to have effect.
                      I like to make an alias for all my internal intranet address space (e.g. if I have all my internal addresses broken up within 10.42.0.0/16 then make an alias "Company-Intranet" for that whole "super-net"). Then on OpenVPN I can pass all with source "Company-Intranet", destination "Company-Intranet" if I just want to let all internal traffic flow. On policy routing to the external internet I can use source LANnet destination !"Company-Intranet" - that avoids accidentally pushing internal network packets out to the external internet.

                      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
                      • J
                        josemaX
                        last edited by

                        @phil.davis:

                        Yes, the policy routing to a gateway group was explicitly directing general traffic to the WAN links in the gateway group. The ping to the OpenVPN tunnel remote end worked because it is seen as a locally-connected subnet, and so can is delivered directly without the policy-routing rule getting a chance to have effect.
                        I like to make an alias for all my internal intranet address space (e.g. if I have all my internal addresses broken up within 10.42.0.0/16 then make an alias "Company-Intranet" for that whole "super-net"). Then on OpenVPN I can pass all with source "Company-Intranet", destination "Company-Intranet" if I just want to let all internal traffic flow. On policy routing to the external internet I can use source LANnet destination !"Company-Intranet" - that avoids accidentally pushing internal network packets out to the external internet.

                        Very good idea, i'll implement it.

                        Thanks again

                        Best,

                        1 Reply Last reply Reply Quote 0
                        • D
                          dynamite1982
                          last edited by

                          I have more than one dc.  i'm just giving a basic map of what i'm trying to do.  forget about what the internal network is doing and if i should need more equipment

                          i just need to be able to extend the lan as explained but so that all locations can communicate with each other and still be on the same lan network.  as i said i had it setup and each one can communicate with the main which is the open vpn server and the main can talk to all but the others need to talk to each other as well

                          1 Reply Last reply Reply Quote 0
                          • D
                            doktornotor Banned
                            last edited by

                            @dynamite1982:

                            I have more than one dc.  i'm just giving a basic map of what i'm trying to do.  forget about what the internal network is doing and if i should need more equipment

                            i just need to be able to extend the lan as explained but so that all locations can communicate with each other and still be on the same lan network.  as i said i had it setup and each one can communicate with the main which is the open vpn server and the main can talk to all but the others need to talk to each other as well

                            Wrong thread, dude. Plus, you will break everything with overlapping nets on multiple sites. Drop this horrible idea.

                            1 Reply Last reply Reply Quote 0
                            • A
                              azizth
                              last edited by

                              Hello,

                              I follow the step, everything is clear and working thank you verry much!!
                              I have just problem, the intra client communication is possible?
                              Client 192.168.2.1 –---> communication ok with Server 192.168.1.1
                              Client 192.168.3.1 -----> communication ok with Server 192.168.1.1
                              Client 192.168.2.1 -----> communication not ok with client 192.168.3.1

                              Thank you

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