OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 17.7 Legacy Series »
  • HAProxy loses function after WAN IP-address change
« previous next »
  • Print
Pages: [1]

Author Topic: HAProxy loses function after WAN IP-address change  (Read 3454 times)

liver007

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
    • View Profile
HAProxy loses function after WAN IP-address change
« on: December 06, 2017, 08:00:19 am »
Hi there, My name is Jeen ทางเข้าufabet
i am using the current 17.7.8 release and have some problems with haproxy, which is used to access some ufabet
surveillance cameras over https (port 7443). because i don't want ssl warnings due to the self-signed certificate of the surveillance-server, i use haproxy with the letsencrypt certificate of the opnsense itself to access the video system. my ISP resets my internet connection (PPPoE) every 24 hours, everytime a new ip address is assigned, so i use an own dyndns-service (updates every minute "opnsense.example.tld"). the both needed frontends are listening to opnsense.example.com:7443 and :7446, which is working fine until the wan ip address changes. after then, the video services are not reachable (timeout) until haproxy is disabled and enabled again (restart via lobby does not work), which in my opinion is caused by not automatically updating the frontend listener address with the newly assigned ip on ip change.

is there any way to fix or circumvent that ?
Logged

fraenki

  • Full Member
  • ***
  • Posts: 171
  • Karma: 28
    • View Profile
    • GitHub
Re: HAProxy loses function after WAN IP-address change
« Reply #1 on: December 07, 2017, 11:23:59 pm »
Quote from: liver007 on December 06, 2017, 08:00:19 am
is there any way to fix or circumvent that ?

Yes: do not bind HAProxy to your WAN IP. Instead, bind HAProxy to a local IP and use a NAT port forward to redirect traffic from your WAN interface to your local HAProxy IP.


Regards
- Frank
Logged

Vaseer

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
    • View Profile
Re: HAProxy loses function after WAN IP-address change
« Reply #2 on: December 11, 2017, 03:41:54 pm »
I was looking in HAProxy and can not find option to bind it to local IP. How/where can I do this?
Logged

fraenki

  • Full Member
  • ***
  • Posts: 171
  • Karma: 28
    • View Profile
    • GitHub
Re: HAProxy loses function after WAN IP-address change
« Reply #3 on: December 13, 2017, 12:18:50 pm »
Quote from: Vaseer on December 11, 2017, 03:41:54 pm
I was looking in HAProxy and can not find option to bind it to local IP. How/where can I do this?

for os-haproxy < 2.0
HAProxy -> Settings -> Frontends -> Edit ->  Listen Addresses

for os-haproxy >= 2.0
HAProxy -> Settings -> Virtual Services -> Public Services -> Edit ->  Listen Addresses


Regards
- Frank
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 17.7 Legacy Series »
  • HAProxy loses function after WAN IP-address change
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2