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

    Internet lost in PfSense but VPN or everythingelse work well?

    Scheduled Pinned Locked Moved General pfSense Questions
    47 Posts 4 Posters 3.8k 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.
    • mucipM
      mucip @stephenw10
      last edited by

      Dear @stephenw10,

      I may add this php file to cron but it must check internet connectivity from LAN not WAN.
      Because normally there is internet on WAN but there isn't on LAN unfortunatelly.
      Regards,
      Mucip:)

      <?php
      
      $internetVar=false;
      
      
      switch (connection_status()){	
      	
      	case CONNECTION_NORMAL:
      	  $txt = 'Connection is in a normal state';
      	  $internetVar=true;
      	  break;
      	case CONNECTION_ABORTED:
      	  $txt = 'Connection aborted';
      	  break;
      	case CONNECTION_TIMEOUT:
      	  $txt = 'Connection timed out';
      	  break;
      	case (CONNECTION_ABORTED & CONNECTION_TIMEOUT):
      	  $txt = 'Connection aborted and timed out';
      	  break;
      	default:
      	  $txt = 'Unknown';
      	  break;
      }
      
      
      
      echo "$txt\n";
      ?> 
      
      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        You can source your test from the LAN IP and that will confirm NAT is working.

        However reviewing the symptoms you have here I'd be willing to bet it's a gateway/routing issue.

        What gateways do you have defined in System > Routing?

        If you have more than one and the default gateway is still set to automatic try setting it to the WAN gateway specifically. It may be switching to one of the others if the WAN ever has an issue.

        mucipM 1 Reply Last reply Reply Quote 0
        • mucipM
          mucip @stephenw10
          last edited by

          Dear @stephenw10,
          Well, What is the CLI command equavelent of below screen?

          14d1e87b-9b6b-4810-b051-afbae8a7af65-resim.png

          Our Geteway config is:
          440597ae-889a-4562-a887-c43b2fed2603-resim.png

          Regards,
          Mucip:)

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

            The command would be:

            [2.7.2-RELEASE][admin@t70.stevew.lan]/root: ping -c 3 -S 192.168.226.1 8.8.8.8
            PING 8.8.8.8 (8.8.8.8) from 192.168.226.1: 56 data bytes
            64 bytes from 8.8.8.8: icmp_seq=0 ttl=116 time=6.036 ms
            64 bytes from 8.8.8.8: icmp_seq=1 ttl=116 time=12.178 ms
            64 bytes from 8.8.8.8: icmp_seq=2 ttl=116 time=6.225 ms
            
            --- 8.8.8.8 ping statistics ---
            3 packets transmitted, 3 packets received, 0.0% packet loss
            round-trip min/avg/max/stddev = 6.036/8.146/12.178/2.852 ms
            

            Where 192.168.226.1 is the LAN IP address.

            However what are you using that gateway on LAN for? You have other subnets behind a router at 192.168.0.1?
            If that's the LAN IP address it should not be there.

            mucipM 1 Reply Last reply Reply Quote 0
            • mucipM
              mucip @stephenw10
              last edited by

              Dear @stephenw10,
              I have modem in the office. PfSense gets internet from modem.
              Modem IP block is 192.168.1.X
              PfSense WAN 192.168.1.99
              PfSense LAN is 192.168.0.1

              Untill recent 3-5 days everything was OK. But nowadays I have problem I don't know why?

              Regards,
              Mucip:)

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

                Ah, OK then that LAN gateway you have set as the LAN interface IP is wrong. You should remove it, it can only cause conflicts.

                mucipM 1 Reply Last reply Reply Quote 0
                • mucipM
                  mucip @stephenw10
                  last edited by

                  Dear @stephenw10,
                  Are you teeling that I need to delete below "LanKapi" ?

                  bf26b502-6872-4372-bafc-f4efe016667a-resim.png

                  Regards,
                  Mucip:)

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

                    Yes, you should only ever have a gateway on LAN if you have some other router in the LAN subnet. And even then it would never be the LAN IP address.

                    mucipM 2 Replies Last reply Reply Quote 0
                    • mucipM
                      mucip @stephenw10
                      last edited by

                      Dear @stephenw10,
                      I deleted. Let's see what is happening afterwards... :)

                      Regards,
                      Mucip:)

                      1 Reply Last reply Reply Quote 0
                      • mucipM
                        mucip @stephenw10
                        last edited by

                        @stephenw10 ,
                        Now I have below error :(

                        2c459287-09ac-477c-b792-0714d18c22a1-resim.png

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

                          Looks like you have monitoring disabled on the WAN gateway so it's not running. Re-enable moniroring on WAN.

                          mucipM 1 Reply Last reply Reply Quote 0
                          • mucipM
                            mucip @stephenw10
                            last edited by

                            @stephenw10,
                            Now it's OK. But what is the monitoring and what is used for?

                            16d9ef48-4951-4ace-9752-a6eb35bc10c4-resim.png

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

                              The dpinger service monitors the state of the WAN by pinging something upstream. By default it pings the gateway address directly but you can change that to some external IP like 8.8.8.8 which usually gives better data on the connection quality. If you have multiple WANs that is what is sued to failover between them. You can see the dpinger data in Status > Monitoring Graphs in the Quality trace.

                              1 Reply Last reply Reply Quote 1
                              • GertjanG
                                Gertjan @mucip
                                last edited by

                                @mucip said in Internet lost in PfSense but VPN or everythingelse work well?:

                                the monitoring and what is used for?

                                And nice stats :

                                79f298d6-5237-4445-8459-f960de6df354-image.png

                                Monitoring the device in front of your pfSense, the ISP router, only tells you something about the cable between them 😊 and nothing much about your entire WAN connection.
                                Monitoring for example 8.8.8.8 tells you something about the 'quality' of the connection up until 8.8.8.8.
                                This will includes your entire 'ISP' WAN connection.

                                No "help me" PM's please. Use the forum, the community will thank you.
                                Edit : and where are the logs ??

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