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

Ipsec Configuration not Working!

Scheduled Pinned Locked Moved IPsec
66 Posts 6 Posters 13.9k 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.
  • L
    luckman212 LAYER 8 @ibnkamala
    last edited by Jun 12, 2022, 6:10 PM

    @ibnkamala why are you making things harder than they need to be? why not replace the "simple internet box" with the pfsense VM and connect IPSEC directly to the Sonicwall on the other end (no NAT required)

    Am I missing something?

    I 1 Reply Last reply Jun 12, 2022, 6:17 PM Reply Quote 1
    • I
      ibnkamala @luckman212
      last edited by ibnkamala Jun 12, 2022, 6:18 PM Jun 12, 2022, 6:17 PM

      @luckman212 how can I replace internetBox by Pfsense/vm? your point was siteA right?

      L 1 Reply Last reply Jun 12, 2022, 6:36 PM Reply Quote 0
      • L
        luckman212 LAYER 8 @ibnkamala
        last edited by Jun 12, 2022, 6:36 PM

        @ibnkamala just unplug "simple internet box" and enable dhcp on your pfsense VM. You will need 2 NICs on there so you can have LAN/WAN or you'll need to use VLANs and have a VLAN-capable switch (I'm guessing you may not have this)

        Yes I am talking about SiteA. I assume you have no direct control over SiteB but I hope that you are at least able to coordinate with whoever controls the Sonicwall to have them set up the tunnel and provide you with the P1/P2 settings.

        I 1 Reply Last reply Jun 12, 2022, 6:52 PM Reply Quote 0
        • I
          ibnkamala @luckman212
          last edited by Jun 12, 2022, 6:52 PM

          @luckman212 sadly I only have one NIC on the workstation that I have pfsense on. (However in reality siteA will be behind NAT)

          Yes I do have direct access to the SiteB, you want me to use SonicWall for the IPsec instead pfsense?

          1 Reply Last reply Reply Quote 0
          • I
            ibnkamala
            last edited by Jun 12, 2022, 7:11 PM

            @gabacho4 and @luckman212 also for your information when I check the port with the Public IPs:

            SiteB is open,

            But SiteA is closed! do you think this is what makes the problem? and since it's a simple internetBox I do not have a firewall to ope the ports at all.

            1 Reply Last reply Reply Quote 0
            • I
              ibnkamala
              last edited by ibnkamala Jun 13, 2022, 8:05 AM Jun 13, 2022, 8:05 AM

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • I
                ibnkamala
                last edited by Jun 13, 2022, 9:14 AM

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • I
                  ibnkamala
                  last edited by ibnkamala Jun 13, 2022, 1:22 PM Jun 13, 2022, 1:19 PM

                  @gabacho4 now both sides are running on 2.6.

                  d15569d1-faba-452a-958d-d59ca3d527f9-image.png
                  472bbbf9-0c95-4ee0-9895-028b62219083-image.png

                  But still not working!

                  For your information when I check the port with the Public IPs here https://www.yougetsignal.com/tools/open-ports/:

                  SiteB is open

                  But SiteA is closed! do you think this is what makes the problem? and since it's a simple internetBox I do not have a firewall to ope the ports at all.

                  G 1 Reply Last reply Jun 13, 2022, 1:56 PM Reply Quote 0
                  • G
                    gabacho4 Rebel Alliance @ibnkamala
                    last edited by Jun 13, 2022, 1:56 PM

                    @ibnkamala sorry just got home from work. So it appears in the last screenshot that both the P1s are connected. That would seem better than it was before. Can you show me the logs so I can see what the P2 is doing? I’m not going to lie to you, your setup is insanely more complicated than I’d ever use. Why would you have pfsense behind another firewall and other hardware? And what is an internet box? A modem? A router? An ONT?

                    I 1 Reply Last reply Jun 13, 2022, 2:52 PM Reply Quote 0
                    • G
                      gabacho4 Rebel Alliance
                      last edited by Jun 13, 2022, 2:41 PM

                      @ibnkamala Ok so I did some Googling. Are you located in Switzerland? I find a internetBox that the ISP in Switzerland offers. If not Switzerland perhaps you are in another European country where the internetBox is used. If you have the device I have found, you can most certainly do port forwarding and/or set up a DMZ. I can't find anything about Ipsec passthrough but it's either there or a DMZ/port forwarding would get the job done.

                      Some advice - except for art, less is not more. I'm a little tweaked to find out you're using virtualized instances of pfsense that are behind multiple devices etc. Should have asked more about your setup at the beginning but for the next time, cough up all the details from the get go please.

                      I 1 Reply Last reply Jun 13, 2022, 2:57 PM Reply Quote 0
                      • I
                        ibnkamala @gabacho4
                        last edited by Jun 13, 2022, 2:52 PM

                        @gabacho4

                        SiteA Logs:


                        Last 50 IPsec Log Entries. (Maximum 50)
                        Time Process PID Message
                        Jun 13 14:56:36 charon 35179 09[CFG] mark_out = 0/0
                        Jun 13 14:56:36 charon 35179 09[CFG] set_mark_in = 0/0
                        Jun 13 14:56:36 charon 35179 09[CFG] set_mark_out = 0/0
                        Jun 13 14:56:36 charon 35179 09[CFG] inactivity = 0
                        Jun 13 14:56:36 charon 35179 09[CFG] proposals = ESP:AES_CBC_256/HMAC_SHA2_256_128/MODP_2048/NO_EXT_SEQ
                        Jun 13 14:56:36 charon 35179 09[CFG] local_ts = 192.168.1.0/24|/0
                        Jun 13 14:56:36 charon 35179 09[CFG] remote_ts = 10.10.0.0/24|/0
                        Jun 13 14:56:36 charon 35179 09[CFG] hw_offload = no
                        Jun 13 14:56:36 charon 35179 09[CFG] sha256_96 = 0
                        Jun 13 14:56:36 charon 35179 09[CFG] copy_df = 1
                        Jun 13 14:56:36 charon 35179 09[CFG] copy_ecn = 1
                        Jun 13 14:56:36 charon 35179 09[CFG] copy_dscp = out
                        Jun 13 14:56:36 charon 35179 09[CFG] version = 2
                        Jun 13 14:56:36 charon 35179 09[CFG] local_addrs = 192.168.1.27
                        Jun 13 14:56:36 charon 35179 09[CFG] remote_addrs = SiteB
                        Jun 13 14:56:36 charon 35179 09[CFG] local_port = 500
                        Jun 13 14:56:36 charon 35179 09[CFG] remote_port = 500
                        Jun 13 14:56:36 charon 35179 09[CFG] send_certreq = 1
                        Jun 13 14:56:36 charon 35179 09[CFG] send_cert = CERT_SEND_IF_ASKED
                        Jun 13 14:56:36 charon 35179 09[CFG] ppk_id = (null)
                        Jun 13 14:56:36 charon 35179 09[CFG] ppk_required = 0
                        Jun 13 14:56:36 charon 35179 09[CFG] mobike = 0
                        Jun 13 14:56:36 charon 35179 09[CFG] aggressive = 0
                        Jun 13 14:56:36 charon 35179 09[CFG] dscp = 0x00
                        Jun 13 14:56:36 charon 35179 09[CFG] encap = 0
                        Jun 13 14:56:36 charon 35179 09[CFG] dpd_delay = 10
                        Jun 13 14:56:36 charon 35179 09[CFG] dpd_timeout = 0
                        Jun 13 14:56:36 charon 35179 09[CFG] fragmentation = 2
                        Jun 13 14:56:36 charon 35179 09[CFG] childless = 0
                        Jun 13 14:56:36 charon 35179 09[CFG] unique = UNIQUE_REPLACE
                        Jun 13 14:56:36 charon 35179 09[CFG] keyingtries = 1
                        Jun 13 14:56:36 charon 35179 09[CFG] reauth_time = 0
                        Jun 13 14:56:36 charon 35179 09[CFG] rekey_time = 34920
                        Jun 13 14:56:36 charon 35179 09[CFG] over_time = 3880
                        Jun 13 14:56:36 charon 35179 09[CFG] rand_time = 3880
                        Jun 13 14:56:36 charon 35179 09[CFG] proposals = IKE:AES_CBC_256/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/MODP_2048
                        Jun 13 14:56:36 charon 35179 09[CFG] if_id_in = 0
                        Jun 13 14:56:36 charon 35179 09[CFG] if_id_out = 0
                        Jun 13 14:56:36 charon 35179 09[CFG] local:
                        Jun 13 14:56:36 charon 35179 09[CFG] class = pre-shared key
                        Jun 13 14:56:36 charon 35179 09[CFG] id = SiteA
                        Jun 13 14:56:36 charon 35179 09[CFG] remote:
                        Jun 13 14:56:36 charon 35179 09[CFG] class = pre-shared key
                        Jun 13 14:56:36 charon 35179 09[CFG] id = SiteB
                        Jun 13 14:56:36 charon 35179 09[CFG] updated vici connection: con1
                        Jun 13 14:56:36 charon 35179 07[CFG] vici client 472 disconnected
                        Jun 13 14:56:42 charon 35179 13[CFG] vici client 473 connected
                        Jun 13 14:56:42 charon 35179 16[CFG] vici client 473 registered for: list-sa
                        Jun 13 14:56:42 charon 35179 12[CFG] vici client 473 requests: list-sas
                        Jun 13 14:56:42 charon 35179 13[CFG] vici client 473 disconnected

                        G 1 Reply Last reply Jun 13, 2022, 2:57 PM Reply Quote 0
                        • G
                          gabacho4 Rebel Alliance @ibnkamala
                          last edited by Jun 13, 2022, 2:57 PM

                          @ibnkamala can you go to Status - System Logs - Settings and change the GUI log entries from 50 to 500?

                          2924fa92-d727-4d39-b6d5-97e865899e79-image.png

                          1 Reply Last reply Reply Quote 1
                          • I
                            ibnkamala @gabacho4
                            last edited by ibnkamala Jun 13, 2022, 2:59 PM Jun 13, 2022, 2:57 PM

                            @gabacho4 I can't post my logs because
                            97a5f1c2-c6b6-45b0-9f04-e1ee5b0d7042-image.png

                            I am in France, once side is orange livebox pro fibre/SiteB and the other end is freebox revolution fibre/SiteA

                            G 2 Replies Last reply Jun 13, 2022, 2:58 PM Reply Quote 0
                            • G
                              gabacho4 Rebel Alliance @ibnkamala
                              last edited by Jun 13, 2022, 2:58 PM

                              @ibnkamala attach them as a file then.

                              1 Reply Last reply Reply Quote 1
                              • G
                                gabacho4 Rebel Alliance @ibnkamala
                                last edited by Jun 13, 2022, 2:59 PM

                                @ibnkamala said in Ipsec Configuration not Working!:

                                @gabacho4 I can't post my logs because
                                97a5f1c2-c6b6-45b0-9f04-e1ee5b0d7042-image.png

                                I am in France, once side is orange bank pro firber /SiteB and the other end is freebox revolution fibre/SiteA

                                OK then note what I said about being able to port forward or set up a DMZ. Your device should have documentation that shows how to do this.

                                I 1 Reply Last reply Jun 13, 2022, 3:17 PM Reply Quote 0
                                • I
                                  ibnkamala
                                  last edited by ibnkamala Jun 13, 2022, 3:20 PM Jun 13, 2022, 3:09 PM

                                  @gabacho4 please find attached logs in PDF and Word document with 500 log records.

                                  1306-Logo-4-gabacho4.zip

                                  Saying thank you is not enough for your great help, however I have to say it

                                  1 Reply Last reply Reply Quote 0
                                  • I
                                    ibnkamala @gabacho4
                                    last edited by Jun 13, 2022, 3:17 PM

                                    @gabacho4 I have already port forward in place, https works fine I am even able to access publicly the pfsense gui, and since I have not change the pfsense ipsec default ports which I think it uses 500 and 4500 so I have crteated below reules.

                                    9b79554c-c983-4300-a2b0-2e983613cd3b-image.png

                                    G 1 Reply Last reply Jun 13, 2022, 4:03 PM Reply Quote 0
                                    • I
                                      ibnkamala
                                      last edited by ibnkamala Jun 13, 2022, 3:29 PM Jun 13, 2022, 3:28 PM

                                      @gabacho4 in my real configuration I will be using https://shop.netgate.com/products/6100-max-pfsense instead of SiteA but still will be behind NAT and won't be here in France it will be in Barcelona

                                      Concerning the SiteB / there won't be any changes. which will happen in 3 days. on Th 16th of June. but for behind a proper firewall and router.

                                      But I wanted to do the manipulation to see how it works, but sadly I am not there yet :)

                                      1 Reply Last reply Reply Quote 0
                                      • G
                                        gabacho4 Rebel Alliance @ibnkamala
                                        last edited by Jun 13, 2022, 4:03 PM

                                        @ibnkamala I don't see that the port forwarding allows the esp protocol through. This is why most internet devices support IPsec passthrough. Can you put the Pfsense box on a DMZ and then try. Looking at your logs, it looks like SiteB tries to connect to SiteA but never gets a response. Would seem to indicate to me that things are not getting through.

                                        I 1 Reply Last reply Jun 13, 2022, 4:05 PM Reply Quote 1
                                        • I
                                          ibnkamala @gabacho4
                                          last edited by Jun 13, 2022, 4:05 PM

                                          @gabacho4 will do that.

                                          L 1 Reply Last reply Jun 13, 2022, 4:50 PM Reply Quote 0
                                          57 out of 66
                                          • First post
                                            57/66
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received