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

    Persistent Internet Connection- available in pfSense?

    Scheduled Pinned Locked Moved General pfSense Questions
    29 Posts 8 Posters 5.4k 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.
    • W
      Wepee
      last edited by

      Hi All,

      Since no one from the forum reply my previous post: https://forum.pfsense.org/index.php?topic=79459.msg433438#msg433438

      I am going to start a new topic about Persistent Connection.

      Is it possible to implement Persistent Connection feature?

      The reason being, my internet connection is not stable, meaning
      sometimes, even though it shows internet connection is available and connected
      But I cannot surf the internet. I need to reboot the pfSense or do disconnect and
      reconnect the WAN interface, then I solve this problem.

      Having a persistent connection will be nice ;D, since it will automatically
      reconnect the connection at its own discretion without human intervention.

      Thank you.

      Reconnection feature is similar to the Linux firewall like Ipcop, see the picture below:

      pfSense-Persistent_Connection_Feature.jpg
      pfSense-Persistent_Connection_Feature.jpg_thumb

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

        haha.

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

          Haha means not possible right?

          I hope you can give me direct answer ;D

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

            Sorry, but no firewall can save you from shitty internet.  Unless you buy two internetz and multiwan.  Even then, if they're both shitty, you might be sitting watching the beachball spin.  Or the hourglass turn.

            Instead of rebooting, go to Status->Interfaces, then release, then renew.

            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
              kejianshi
              last edited by

              It was such a funny question, I though it was one of those regularly occurring jabs at pfsense….

              1 Reply Last reply Reply Quote 0
              • H
                heper
                last edited by

                set your monitor IP to a public ip address. system–>routing-->gateways

                1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  This feature is already in pfSense.
                  The problem you seem to be having is that it doesn't realise when the connection has gone bad. The answer is to set the monitor IP to something else as Heper suggested. Normally it is set to the address supplied as the gateway on the WAN. If the problem is upstream of that then it will continue to respond to pings and pfSense cannot know there is a fault.

                  Steve

                  1 Reply Last reply Reply Quote 0
                  • H
                    Harvy66
                    last edited by

                    In the past, I've seen software that will multiplex your data over several connections, recombine the data at their servers, then forward your reassembled data. Kind of a custom VPN tunnel. This way if any of your connections experiences lag spikes or packet-loss, it would very quickly shift data to your other links. You ping was ping was closer to your lowest ping connection and your bandwidth was close to some percentage of the aggregate of your links.

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

                      OK guys :) Thank you for answers.

                      So…..I went to the System->Routing->System: Gateways, below is what I get:

                      Name:
                      WAN_PPOE(default)

                      Interface:
                      WAN

                      Gateway:
                      192.228.xxx.xxx

                      Monitor IP
                      192.228.xxx.xxx –--> Change this IP to a public DNS server e.g: 8.8.8.8 (Google free DNS server)
                      By clicking the "edit button" and key in the IP adddress = 8.8.8.8 into the Alternative monitor IP

                      Below is the description retrieve from the https://doc.pfsense.org/index.php/Gateway_Settings
                      Alternative Monitor IP: An address to ping via this gateway instead of the gateway itself. If the gateway is local, such as
                      one directly on a CPE or modem, then pinging a remote address such as a DNS server is a better measure of how useful or
                      alive the WAN may be

                      Question:
                      This settting is concering the Apinger Service or aka Gateway Monitoring Daemon…..
                      And that is all I know but don't really know what is real function besides monitoring.
                      So, if the Apinger Service ping probing to the DNS address: 8.8.8.8 is lost/disconnected,
                      pfsense will try to re-establish the WAN connection again, am I right?  ::)

                      1 Reply Last reply Reply Quote 0
                      • H
                        heper
                        last edited by

                        it will mark the gateway as "DOWN' when it can no longer ping the monitor-ip.
                        this will result in states getting clear among a dozen other stuff going on. when your connection gets back online, and the gateway is marked as "UP' then tons of services will be restarted

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

                          @heper:

                          it will mark the gateway as "DOWN' when it can no longer ping the monitor-ip.
                          this will result in states getting clear among a dozen other stuff going on. when your connection gets back online, and the gateway is marked as "UP' then tons of services will be restarted

                          Let me understand your answer again…... :)
                          So in other words, the service will monitor the ip address given by me.
                          and.....if it cannot ping to the ip address, it will not try to reconnect the line(that is redial the ADSL modem)
                          Except keep monitoring….until it sense the connection is established to
                          my given IP address that  is 8.8.8.8. Am I right? :)

                          1 Reply Last reply Reply Quote 0
                          • C
                            cmb
                            last edited by

                            @Wepee:

                            Reconnection feature is similar to the Linux firewall like Ipcop, see the picture below:

                            No it's not. That only determines whether it keeps the PPPoE session active all the time. The "persistent" option you show in IPcop is what we do by default, connect PPPoE immediately and leave it connected regardless of whether there is any activity. If your Internet drops without dropping your PPPoE session, that won't do anything. The PPPoE won't try to reconnect unless it's actually not connected. That's true on Linux too. If your PPPoE is up, but you have no Internet, you have an ISP problem.

                            Gateway monitoring won't reconnect your WAN. PPPoE does that on its own. If the ISP wants/needs you to reconnect, they should terminate the session and it'll automatically reconnect. Even if they just drop the session, it'll reconnect on its own. An active PPPoE session should never lose connectivity. Where it does, it's an ISP issue.

                            That said, that's assuming your problem is completely losing connectivity, which isn't entirely clear is the case from the description. You mentioned losing DNS. Can you still ping out by IP when that happens? Like try pinging 8.8.8.8 or 8.8.4.4.

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

                              @cmb:

                              @Wepee:

                              Reconnection feature is similar to the Linux firewall like Ipcop, see the picture below:

                              No it's not. That only determines whether it keeps the PPPoE session active all the time. The "persistent" option you show in IPcop is what we do by default, connect PPPoE immediately and leave it connected regardless of whether there is any activity. If your Internet drops without dropping your PPPoE session, that won't do anything. The PPPoE won't try to reconnect unless it's actually not connected. That's true on Linux too. If your PPPoE is up, but you have no Internet, you have an ISP problem.

                              Gateway monitoring won't reconnect your WAN. PPPoE does that on its own. If the ISP wants/needs you to reconnect, they should terminate the session and it'll automatically reconnect. Even if they just drop the session, it'll reconnect on its own. An active PPPoE session should never lose connectivity. Where it does, it's an ISP issue.

                              That said, that's assuming your problem is completely losing connectivity, which isn't entirely clear is the case from the description. You mentioned losing DNS. Can you still ping out by IP when that happens? Like try pinging 8.8.8.8 or 8.8.4.4.

                              Hi Chris,

                              Thank you for answering my question. :)
                              As you probably know by now, I was using a linux firewall before and switched to pfSense.

                              Ok, now I know what is going on…..

                              1. pfSense by default is using persistent connection method, it means if the ISP cut the PPOE session,
                                pfSense will try to reestablish the link.

                              2. However, if the PPOE session is still on, pfsense won't know whether the internet traffic is passing through or not.

                              3. Gateway monitoring- having it configuring properly, it won't make pfSense to reconnect when in
                                the case if PPOE session is still on, but internet traffic is not flowing from 1 end to the other end.

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

                                That said, that's assuming your problem is completely losing connectivity, which isn't entirely clear is the case from the description. You mentioned losing DNS. Can you still ping out by IP when that happens? Like try pinging 8.8.8.8 or 8.8.4.4.

                                Yes, if I can remember correctly, I can ping to 8.8.8.8.
                                But not my ISP dns server adddress.

                                The funny thing is if I reboot the pfSense or if I do a quick disconnection and reconnection,
                                everything will go back to normal again. I can surf the internet after doing rebooting or
                                disable and enble the WAN connection.

                                So, to solve this problem, I have a timer plugged into the power outlet and feed the power from the timer to the ADSL modem.
                                The timer will turn off and on(for a few seconds) the supply power to the modem every 9 am morning.

                                On top of that, I have pfSense to schedule a reboot at 12.00 am midnight.

                                But it seems to partially solve the problem, though less frequent but it is still happening nevertheless, during the day occasionally.

                                1 Reply Last reply Reply Quote 0
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  Setting an external monitor IP that really becomes inaccessible will at least give you a record of when the connection fails. You can use that to compare your logs or as data to complain to your ISP. It won't reconnect though unless the PPP connection actually goes down. Using 8.8.8.8 obviously won't help if you can still ping that even when you no longer have general internet connectivity.

                                  You probably need to establish just what you still do and don't have access to when the connection fails.

                                  There is an option for a periodic reset in the PPPoE setup which is a better solution than an electrical timer. Everytime you reset a DSL modem the equipment at the other end sees that and very often will lower your line speed in an attempt to get a stable connection. If you are continually resetting it you may be significantly throttled! It can take up to a week of continuous connection to re-establish the correct line rate.

                                  Steve

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

                                    I'm thinking that if you can ping 8.8.8.8 when your internet is "down", your internet isn't down…

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

                                      @stephenw10:

                                      There is an option for a periodic reset in the PPPoE setup which is a better solution than an electrical timer. Everytime you reset a DSL modem the equipment at the other end sees that and very often will lower your line speed in an attempt to get a stable connection. If you are continually resetting it you may be significantly throttled! It can take up to a week of continuous connection to re-establish the correct line rate.

                                      Hmm…...this something new to me, that is throttling down the download speed. :)
                                      But, so far I have never tested it. ???

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

                                        @kejianshi:

                                        I'm thinking that if you can ping 8.8.8.8 when your internet is "down", your internet isn't down…

                                        Yes, I already know about this.
                                        When symptom, occurs, ISP dns server, is not reachable using Ping command.
                                        Whereas Google free DNS server is reachable.
                                        But internet surf in not available.
                                        pfSense WAN interface still showing the WAN adsl PPOE connection is UP and running.

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

                                          Setting an external monitor IP that really becomes inaccessible will at least give you a record of when the connection fails. You can use that to compare your logs or as data to complain to your ISP

                                          I am afraid, that is not much I can do, complaining this issue to the ONLY ISP available in small town.
                                          Complaint may be accepted, but problem will still exist.
                                          That is just bad customer service, that is way it works in my country.

                                          Usually, folks in the city won't complain, they just switch to another ISP since there are more choices available.

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

                                            I am thinking may be 1 of the PCs is infected with malware or trojan or botnet or some malicious program,
                                            and it is blasting out SPAM continuously…....

                                            And the ISP is blocking my dynamic WAN IP address, to stop the SPAM traffic flowing out the internet. ::)

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