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

    Site to Site with DD-WRT (SOLVED)

    Scheduled Pinned Locked Moved OpenVPN
    29 Posts 5 Posters 6.0k Views
    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.
    • K
      killmasta93
      last edited by

      Thanks for the reply, yeah the upper one was a messed up, the second one is correct, when you say is the DDWRT the default gateway do you mean create a rule
      or the default gateway of which the it gets from the OpenVPN? which it gets a 192.168.90.6
      or the the gateway of the DDWRT which is 192.168.1.251

      Thank you

      Tutorials:

      https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

      1 Reply Last reply Reply Quote 0
      • V
        viragomann
        last edited by

        I asked if the DDWRT is the default gateway in the network behind (192.168.1.0/24).

        1 Reply Last reply Reply Quote 0
        • K
          killmasta93
          last edited by

          yes the DDWRT is the default gateway for the network 192.168.1.0/24

          Tutorials:

          https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

          1 Reply Last reply Reply Quote 0
          • V
            viragomann
            last edited by

            It seems that pfSense doesn't find the correct route to the network behind DDWRT.

            Are you running multiple VPN instances on pfSense, both server and client?

            Please post the IPv4 routing table from pfSense.

            1 Reply Last reply Reply Quote 0
            • K
              killmasta93
              last edited by

              Thank you for the reply,
              as I am also running other OpenVPN servers but there are only remote for clients

              See picture for the routing

              Thank you

              Clipboarder.2017.03.22-013.png
              Clipboarder.2017.03.22-012.png_thumb
              Clipboarder.2017.03.22-012.png
              Clipboarder.2017.03.22-010.png
              Clipboarder.2017.03.22-010.png_thumb
              Clipboarder.2017.03.22-011.png
              Clipboarder.2017.03.22-011.png_thumb
              Clipboarder.2017.03.22-013.png_thumb

              Tutorials:

              https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

              1 Reply Last reply Reply Quote 0
              • V
                viragomann
                last edited by

                As mentioned, it doesn't matter which kind of OpenVPN instances, if you run multiple and you haven't assigned separate interfaces to them all are handled as an unique interface group.

                So for correct routing you have to assign an interface to the site-to-site server. Interface > assign
                At available network ports select the site-to-site server and click Add, open the new interface and enable it, also enter a proper description and save it.

                1 Reply Last reply Reply Quote 0
                • K
                  killmasta93
                  last edited by

                  Thanks for the reply so something like this? Assuming on DDWRT when it shows connected to remote address it must be the gateway? Would i also delete the Rule on openVPN for

                  IPv4 * 192.168.90.0/24 * * * * none

                  Thank you see pictures

                  Clipboarder.2017.03.22-016.png
                  Clipboarder.2017.03.22-016.png_thumb
                  Clipboarder.2017.03.22-017.png
                  Clipboarder.2017.03.22-017.png_thumb
                  Clipboarder.2017.03.22-018.png
                  Clipboarder.2017.03.22-018.png_thumb
                  Clipboarder.2017.03.22-019.png
                  Clipboarder.2017.03.22-019.png_thumb

                  Tutorials:

                  https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

                  1 Reply Last reply Reply Quote 0
                  • V
                    viragomann
                    last edited by

                    Yes, but don't set an IP address on the interface, just enable it. IP has to be set to "None"!

                    1 Reply Last reply Reply Quote 0
                    • K
                      killmasta93
                      last edited by

                      Thanks for the reply So configured to none but still nothing :(

                      Thank you

                      Clipboarder.2017.03.22-020.png
                      Clipboarder.2017.03.22-020.png_thumb

                      Tutorials:

                      https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

                      1 Reply Last reply Reply Quote 0
                      • V
                        viragomann
                        last edited by

                        Have you tried to reboot pfSense?

                        If it still doesn't work after reboot make a packet capture on the SitetoSite interface and select ICMP protocol while you try a ping to the DDWRT. Maybe there is something wrong with the NAT.
                        Post the capture output, please.

                        1 Reply Last reply Reply Quote 0
                        • K
                          killmasta93
                          last edited by

                          Thanks for the reply

                          here is the packet capture

                          from the packet capture only showed these lines

                          20:12:56.238295 IP 192.168.90.1 > 192.168.1.251: ICMP echo request, id 4676, seq 0, length 64
                          20:12:57.253548 IP 192.168.90.1 > 192.168.1.251: ICMP echo request, id 4676, seq 1, length 64
                          20:12:58.256451 IP 192.168.90.1 > 192.168.1.251: ICMP echo request, id 4676, seq 2, length 64
                          
                          

                          packet capture

                          http://www.filedropper.com/openvpn

                          Thank you again

                          Tutorials:

                          https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

                          1 Reply Last reply Reply Quote 0
                          • V
                            viragomann
                            last edited by

                            So you get no responses from DDWRT, though the pings come from the VPN server which is connected directly to the DDWRTs interface.
                            I think DDWRT blocks the access. Check its firewall rules.

                            1 Reply Last reply Reply Quote 0
                            • DerelictD
                              Derelict LAYER 8 Netgate
                              last edited by

                              This is not a DDWRT forum.

                              Chattanooga, Tennessee, USA
                              A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                              DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                              Do Not Chat For Help! NO_WAN_EGRESS(TM)

                              1 Reply Last reply Reply Quote 0
                              • K
                                killmasta93
                                last edited by

                                Thanks for the reply,

                                @derelict, your correct but as i posted on the DDWRT forums i got yelled at saying its a server issue with pfSense

                                @viragomann
                                so this means that the routing is correct on the server side? just want to make sure before i start messing with Iptables on DDWRT

                                Thank you

                                Tutorials:

                                https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

                                1 Reply Last reply Reply Quote 0
                                • V
                                  viragomann
                                  last edited by

                                  The routes look well, 192.168.1.0/24 points to the vpn client. So this subnet is routed over the vpn as the packet capture on vpn server interface shows. You should see the exactly same packets on the clients vpn interface.

                                  1 Reply Last reply Reply Quote 0
                                  • K
                                    killmasta93
                                    last edited by

                                    Thanks for the reply, as i was investigating on DDWRT as they told me it this also i even turn off the firewall of DDWRT so i think it might be something with the routes

                                    you have to add a static route for the OpenVPN client's local IP network to the OpenVPN server config, and use iroute to inform the OpenVPN server that that static route is associated w/ that OpenVPN client. You must address this issue before devices on the OpenVPN server side can initiate connections to devices on the OpenVPN client side.

                                    Tutorials:

                                    https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

                                    1 Reply Last reply Reply Quote 0
                                    • P
                                      piperspace
                                      last edited by

                                      I have a working set up which I believe is similar to yours. I am in the process of upgrading from dd-wrt to pfsense with site-to-site OpenVPN.

                                      On the server end I have pfsense running OpenVPN server on subnet 10.0.1.1/24. On the client I have dd-wrt running OpenVPN client on 192.168.122.1/24.

                                      In order to route useful traffic over my VPN it was necessary to add the following directive to pfsense => OpenVPN => Server => Advanced Configuration => Custom options

                                      push "route 10.0.1.0 255.255.255.0"

                                      Also, in pfsense => OpenVPN => Client Specific Overrides => I created an entry with the Common Name (CN) of the client. In that entry Client Settings => Advanced has:

                                      iroute 192.168.122.0 255.255.255.0

                                      The first directive allows stations on the client lan to see assets on the server's lan. The second directive allows stations on the server lan to see assets on the client lan.

                                      Hope this helps.

                                      1 Reply Last reply Reply Quote 0
                                      • K
                                        killmasta93
                                        last edited by

                                        Thank you for the reply as i think this might be it but not sure its not working so my OpenVPN server on pfSense is 192.168.90.0/24
                                        and on advance did

                                        Also my pfSense LAN is 192.168.3.0/24

                                        push "route 192.168.90.0 255.255.255.0";
                                        

                                        then on client overide added at the bottom this i also added the static IP just to see if it was working the client override which it was

                                        push "route 192.168.1.0 255.255.255.0";  
                                        ifconfig-push 192.168.90.8 192.168.90.5;
                                        

                                        Then rebooted pfSense but still pfSense cannot ping DDWRT BUT DDWRT can ping pfSense

                                        I also turned off on DDWRT the firewall just to make sure

                                        Thank you see pictures

                                        Clipboarder.2017.03.25-006.png_thumb
                                        Clipboarder.2017.03.25-006.png
                                        Clipboarder.2017.03.25-009.png
                                        Clipboarder.2017.03.25-009.png_thumb
                                        Clipboarder.2017.03.24-004.png
                                        Clipboarder.2017.03.24-004.png_thumb
                                        Clipboarder.2017.03.25-008.png
                                        Clipboarder.2017.03.25-008.png_thumb
                                        Clipboarder.2017.03.25-007.png
                                        Clipboarder.2017.03.25-007.png_thumb

                                        Tutorials:

                                        https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

                                        1 Reply Last reply Reply Quote 0
                                        • P
                                          piperspace
                                          last edited by

                                          In your setup I suggest:

                                          push "route 192.168.3.0 255.255.255.0"

                                          as the server option and

                                          iroute 192.168.1.0 255.255.255.0

                                          in the client specific override.

                                          1 Reply Last reply Reply Quote 0
                                          • K
                                            killmasta93
                                            last edited by

                                            Thanks for the reply so i finally solved the issue while reading how OpenVPN works,

                                            OpenVPN uses this table

                                            [  1,  2] [  5,  6] [  9, 10] [ 13, 14] [ 17, 18]
                                            [ 21, 22] [ 25, 26] [ 29, 30] [ 33, 34] [ 37, 38]
                                            [ 41, 42] [ 45, 46] [ 49, 50] [ 53, 54] [ 57, 58]
                                            [ 61, 62] [ 65, 66] [ 69, 70] [ 73, 74] [ 77, 78]
                                            [ 81, 82] [ 85, 86] [ 89, 90] [ 93, 94] [ 97, 98]
                                            [101,102] [105,106] [109,110] [113,114] [117,118]
                                            

                                            Meaning if my config on OpenVPN server is ifconfig 192.168.90.1 192.168.90.2

                                            so then i needed to give my client overide this, the client gets 192.168.90.5 and the gateway is 192.168.90.6

                                            ifconfig-push 192.168.90.5 192.168.90.6
                                            iroute 192.168.1.0 255.255.255.0
                                            

                                            Felt so silly after one week

                                            Now pfSense can ping DDWRT so at the end it was not  DDWRT issue

                                            Hope this helps someone else

                                            Tutorials:

                                            https://www.mediafire.com/folder/v329emaz1e9ih/Tutorials

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