dpinger cron
-
I have a silly problem with a 4G tp link modem which continues to fall offline which means it isn't available to failover to if the WAN goes down as the gateway is "down" when it isn't really
I have moved the interface off DHCP and gone static which has improved the situation a lot but it still goes "down" at least once per week
The solution to this has been to restart the dpinger service and instantly the failover is alive again
I don't think this is a pfsense issue, I believe it's the 4g modem
Rather than log in each affected site and restart dpinger manually, I would like to cron this
I've installed the cron package but I don't know what to run as the command to restart this service
I thought it would be dpinger-service.sh or something like that but it doesn't seem to be
Does anyone know what command would restart this service?
-
@Eria211 said in dpinger cron:
I don't think this is a pfsense issue, I believe it's the 4g modem
indeed, you are right in this
TP-Link 4G stuff is not the best, we use this in IP pass -throught mode:
https://www.4gltemall.com/huawei-b2338-168-fdd-td-lte-outdoor-cpe.html
with industrial SIM card for business w/o NAT -
Hello!
Is your issue possibly similar to this :
https://forum.netgate.com/topic/155079/wan2-goes-down-for-packet-loss-doesn-t-come-back-up-until-gateways-page-viewed/
?
A chunk of code like this should restart dpinger :
#!/usr/local/bin/php-cgi -q <?php require_once("gwlb.inc"); setup_gateways_monitor (); ?>
John
-
#!/usr/local/bin/php-cgi -q
each additional dexterity(?) and / or attempt only brings more errors into the system
(scripts plus restarts and more)
what doesn’t work should be forgotten, because it only causes headachesthe right hardware is the way to go
this is the rule of formal logic...btw:
I know it’s hard to get rid of what’s on hand, but it’s not always the best solution (use hardware that is causing problems ?????????) -
Clicking on the Restart Service button for DPinger on the Status -> Services page just calls the setup_gateways_monitor function in /etc/inc/gwlb.inc
-
Try running:
/etc/rc.newwanip
That will run more things then you actually need but does restart dpinger.Oct 9 18:03:12 dpinger send_interval 500ms loss_interval 2000ms time_period 60000ms report_interval 0ms data_len 1 alert_interval 1000ms latency_alarm 500ms loss_alarm 20% dest_addr 172.21.16.1 bind_addr 172.21.16.226 identifier "WAN_DHCP "
Oct 9 18:03:12 php-cgi rc.newwanip: rc.newwanip: Info: starting on . Oct 9 18:03:12 php-cgi rc.newwanip: rc.newwanip: on (IP address: 172.21.16.226) (interface: WAN[wan]) (real interface: igb0). Oct 9 18:03:13 php-cgi rc.newwanip: Gateway, none 'available' for inet6, use the first one configured. '' Oct 9 18:03:16 php-cgi rc.newwanip: Resyncing OpenVPN instances for interface WAN. Oct 9 18:03:16 php-cgi rc.newwanip: Creating rrd update script Oct 9 18:03:19 php-cgi rc.newwanip: pfSense package system has detected an IP change or dynamic WAN reconnection - 172.21.16.226 -> 172.21.16.226 - Restarting packages. Oct 9 18:03:19 check_reload_status Starting packages Oct 9 18:03:20 php-fpm 2184 /rc.start_packages: Restarting/Starting all packages.
You can specify which interface it is too so it only restarts your 4G WAN.
Steve