Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
CARP Trigger Script
« previous
next »
Print
Pages: [
1
]
Author
Topic: CARP Trigger Script (Read 3281 times)
nertwork
Newbie
Posts: 5
Karma: 0
CARP Trigger Script
«
on:
September 11, 2019, 11:54:12 am »
Hello,
I'm trying to run something on this where if carp is no longer master but in backup I can run a script. I'm not sure if this is possible but if it is I would like to know where to put that and how to do it.
Thanks!
Logged
mimugmail
Hero Member
Posts: 6766
Karma: 494
Re: CARP Trigger Script
«
Reply #1 on:
September 11, 2019, 01:03:38 pm »
https://github.com/opnsense/core/tree/master/src/etc/rc.syshook.d/carp
We also had some addions to frr plugin and Ad did some nice additions to capture syslog-ng events and trigger actions.
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
nertwork
Newbie
Posts: 5
Karma: 0
Re: CARP Trigger Script
«
Reply #2 on:
September 11, 2019, 09:26:35 pm »
Sorry, I'm kinda new to this. I have an ISO install that doesn't seem to have anything in /etc/rc.syshook.d/carp/
root@router2:/etc # uname -r
11.2-RELEASE-p14-HBSD
Logged
mimugmail
Hero Member
Posts: 6766
Karma: 494
Re: CARP Trigger Script
«
Reply #3 on:
September 11, 2019, 09:55:18 pm »
Prefix is always /usr/local
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
nertwork
Newbie
Posts: 5
Karma: 0
Re: CARP Trigger Script
«
Reply #4 on:
September 12, 2019, 12:46:18 am »
Oh cool! I see it now - so I tried putting a shell script in there with just grabbing some ARGV stuff and it doesn't seem like it calls it. So all I want to do is shut an interface off when it's backup and when it's master bring the interface back online again.
Not sure if that's something to easily do in php here, or if there's an existing script template to use.
Thanks for any additional help here - you've been great on the forums!
Logged
mimugmail
Hero Member
Posts: 6766
Karma: 494
Re: CARP Trigger Script
«
Reply #5 on:
September 12, 2019, 05:45:14 am »
You want it for pppoe?
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
nertwork
Newbie
Posts: 5
Karma: 0
Re: CARP Trigger Script
«
Reply #6 on:
September 12, 2019, 08:05:42 am »
Not ppoe - I have residential cable internet with DHCP for the home lab. I have a 2960g and when I set up HA it shows the MAC address bouncing between the two nodes. I also see slower internet speeds and some missed pings when HA is enabled.
Not sure if I'm doing it right but I have CARP set on just the LAN with a .2 and .3 physical with a .1 virtual address on the lan. I don't have anything set up for the WAN. OVPN works fine when bound to the virtual address.
Logged
mimugmail
Hero Member
Posts: 6766
Karma: 494
Re: CARP Trigger Script
«
Reply #7 on:
September 12, 2019, 08:08:35 am »
How do you handle WAN failover with DHCP? Usually you need the Modem do the dialup and OPN with private subnet as WAN
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
nertwork
Newbie
Posts: 5
Karma: 0
Re: CARP Trigger Script
«
Reply #8 on:
September 12, 2019, 09:02:16 am »
So I'm hoping to have carp trigger an interface down on the wan interface when it's backup. When it's master I would like it to trigger an interface up on the wan interface. I don't want to double-nat here, I want to be able to have opnsense have a public dynamic ip address.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
CARP Trigger Script