Welcome, Guest. Please login or register.
Did you miss your activation email?
+  pfSense Forum
|-+  pfSense English Support» Routing and Multi WAN» Dual WAN failover, PAP2T and asterisk won't register unless reset states
Username:
Password:
 
 

Pages: 1 [2]  All   Go Down
  Print  
Author Topic: Dual WAN failover, PAP2T and asterisk won't register unless reset states  (Read 14787 times)
0 Members and 1 Guest are viewing this topic.
sullrich
Hero Member
*****
Offline Offline

Posts: 5135



View Profile WWW
« Reply #15 on: February 24, 2008, 04:46:53 pm »

Look in /var/db/pingstatus

Each monitored item will appear there.  Simply look for DOWN in the files.  You could easily parse each file looking for DOWN and then resolve the IP back to the interface.
Logged
ilko
Newbie
*
Offline Offline

Posts: 20


View Profile
« Reply #16 on: February 24, 2008, 09:01:53 pm »

That directory is empty, same as pingmsstatus. No such files in /var/db.
Logged
ilko
Newbie
*
Offline Offline

Posts: 20


View Profile
« Reply #17 on: February 25, 2008, 09:21:10 pm »

Try pfctl -F all -i {$interface_that_goes_down}
Is better and should avoid running it twice.
Using
#!/bin/sh
sleep 5
/sbin/pfctl -F all

causes no new states created- Diagnostics: Show States- "No states were found."

back to
Quote
#!/bin/sh
sleep 60
/sbin/pfctl -F state
sleep 40
/sbin/pfctl -F state

This also makes when WAN or OPT1 are back online, all connections to use their preferred gateway again, which is good.
If we reset states on the failed gateway only, the above will not happen.
Need more time to study the negative effect of reseting states.

Logged
ilko
Newbie
*
Offline Offline

Posts: 20


View Profile
« Reply #18 on: March 11, 2008, 07:02:28 pm »

Since I've added this for 3 weeks it's working fine, however OPT1 has failed just a few times during office hours. No complains about loss of internet or failed PAP2T device for now. I will stick with this workaround until better solution comes up.

In short:

Change /conf/config.xml
Code:
<system>
...
....
<afterfilterchangeshellcmd>/usr/local/bin/reset_states.sh</afterfilterchangeshellcmd>

Create /usr/local/bin/reset_states.sh
Code:
#!/bin/sh
sleep 60
/sbin/pfctl -F state
sleep 40
/sbin/pfctl -F state
chmod 755 /usr/local/bin/reset_states.sh



Logged
Pages: 1 [2]  All   Go Up
  Print  
 
Jump to:  

 

Page created in 0.026 seconds with 19 queries.