Netgate SG-1000 microFirewall

Author Topic: Backup CARP router unable to access internet  (Read 279 times)

0 Members and 1 Guest are viewing this topic.

Offline samelmore

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Backup CARP router unable to access internet
« on: August 25, 2017, 08:15:09 pm »
I currently have an HA setup between two pfSense 2.3.4 routers.  CARP failover works just fine.  However, the backup CARP router cannot access the internet.  I have advanced/manual outbound NAT rules setup for each of my subnets using the external CARP address, so all traffic is coming from the VIP's from those networks (going out the WAN).  For the 127.0.0.0/8 network outbound NAT (WAN interface), I have tried NO NAT, I have tried the VIP WAN IP, as well as the Interface Address.  None seem to allow the backup CARP router to access the internet.  This is a problem because, as one example, I cannot check for updates from the backup router without switching it to master first.

To troubleshoot, I have verified that when pinging from the backup CARP router to the internet, the packet goes out using the WAN VIP.  Therefore, if I packet capture on the master CARP router, it sees the ICMP packets returned to it, so they're ultimately not getting back to the backup router.

What outbound NAT rule do I need to enable this to work (to be able to ping/access from backup router to internet addresses)?  Are the outbound rules even the problem in this case?

Thanks,
Sam

Offline Derelict

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9257
  • Karma: +1054/-308
    • View Profile
Re: Backup CARP router unable to access internet
« Reply #1 on: August 25, 2017, 08:22:31 pm »
Do you have a public IP address for the primary interface, secondary interface, and the CARP VIP on WAN?

Quote
I have verified that when pinging from the backup CARP router to the internet, the packet goes out using the WAN VIP.
Traffic from the firewall itself should go out sourced from the interface address, not the CARP VIP.

If the secondary is sending traffic from the firewall out WAN and translating the source address to the CARP VIP, your outbound NAT rules are wrong.

Source any there is not what you want. Neither is source WAN net or WAN address.
« Last Edit: August 25, 2017, 08:28:31 pm by Derelict »
Las Vegas, Nevada, USA
Use this diagram to describe your issue.
The pfSense Book is now available for just $24.70!
Do Not PM For Help! NO_WAN_EGRESSTM

Offline samelmore

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Backup CARP router unable to access internet
« Reply #2 on: August 25, 2017, 08:39:47 pm »
Yes, I understand I don't want packets from the pfSense to go out as the WAN VIP.  I have tried using the outbound rule as follows, which still fails:

Interface: WAN
Source: 127.0.0.0/8
Destination: any
NAT Address: Interface Address

This still results in ping packets originating from the backup pfSense router (using Diagnostics -> Ping) coming from the WAN VIP.  I'm unsure how to troubleshoot further, as the above outbound NAT rule seems like it should work correctly.

Thanks,
Sam

Offline Derelict

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9257
  • Karma: +1054/-308
    • View Profile
Re: Backup CARP router unable to access internet
« Reply #3 on: August 25, 2017, 09:19:35 pm »
Yeah. Post your outbound NAT rules on the primary and secondary.
Las Vegas, Nevada, USA
Use this diagram to describe your issue.
The pfSense Book is now available for just $24.70!
Do Not PM For Help! NO_WAN_EGRESSTM

Offline samelmore

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Backup CARP router unable to access internet
« Reply #4 on: August 25, 2017, 10:27:00 pm »
Outbound NAT rules:

Iface WAN - src 127.0.0.0/8 - dst * - NAT: WAN Address
Iface WAN - src 192.168.187.0/24 - dst * - NAT: WAN VIP
Iface WAN - src 192.168.179.0/24 - dst * - NAT: WAN VIP
Iface WAN - src 192.168.21.0/24 - dst * - NAT: WAN VIP

Offline Derelict

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9257
  • Karma: +1054/-308
    • View Profile
Re: Backup CARP router unable to access internet
« Reply #5 on: August 25, 2017, 11:38:38 pm »
Outbound connections from the secondary are not sourced from 127.0.0.1. They are sourced from the interface address. There is no outbound NAT. In fact, it is normal to change those rules to use the CARP VIP if sourced from 127.0.0.0/8, not WAN address. Again, what you do not want to NAT is sourcing from the WAN subnet.

I cannot think of anything off the top of my head to tell you to check.

I'd need to see a lot more information about your firewall's config. The normal CARP config does not do what you are saying it is doing.

You might need to get over not providing WAN address information so we can actually see what is going on there.

pcaps on WAN interfaces for icmp on my lab HA pair:

Primary:
04:36:17.542757 IP 172.25.228.18 > 172.25.228.1: ICMP echo request, id 58300, seq 6383, length 8
04:36:17.542897 IP 172.25.228.1 > 172.25.228.18: ICMP echo reply, id 58300, seq 6383, length 8
04:36:18.070377 IP 172.25.228.18 > 172.25.228.1: ICMP echo request, id 58300, seq 6384, length 8
04:36:18.070492 IP 172.25.228.1 > 172.25.228.18: ICMP echo reply, id 58300, seq 6384, length 8
04:36:18.602750 IP 172.25.228.18 > 172.25.228.1: ICMP echo request, id 58300, seq 6385, length 8
04:36:18.602878 IP 172.25.228.1 > 172.25.228.18: ICMP echo reply, id 58300, seq 6385, length 8

Secondary:
04:34:26.972616 IP 172.25.228.19 > 172.25.228.1: ICMP echo request, id 35112, seq 17494, length 8
04:34:26.972759 IP 172.25.228.1 > 172.25.228.19: ICMP echo reply, id 35112, seq 17494, length 8
04:34:27.502601 IP 172.25.228.19 > 172.25.228.1: ICMP echo request, id 35112, seq 17495, length 8
04:34:27.502752 IP 172.25.228.1 > 172.25.228.19: ICMP echo reply, id 35112, seq 17495, length 8
04:34:28.032678 IP 172.25.228.19 > 172.25.228.1: ICMP echo request, id 35112, seq 17496, length 8
04:34:28.032828 IP 172.25.228.1 > 172.25.228.19: ICMP echo reply, id 35112, seq 17496, length 8

The CARP VIP is 172.26.228.17

Outbound NAT rules for WAN are attached.
Las Vegas, Nevada, USA
Use this diagram to describe your issue.
The pfSense Book is now available for just $24.70!
Do Not PM For Help! NO_WAN_EGRESSTM

Offline EdCazini

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Backup CARP router unable to access internet
« Reply #6 on: November 28, 2017, 06:02:43 am »
Hi, in my case (v 2.4.2-RELEASE (amd64) ), I solved it with the following settings:

- Outbound NAT Mode = Hybrid Outbound NAT rule generation
- Putting below as the 1st rule in Firewall/NAT/Outbound (in primary, will replicate to backup), see pic below
Code: [Select]
Iface=WAN - src=This Firewall - dst=* - NAT=WAN Address
P.S.
- been using pfSense since 2006
- but this is my 1st post. edit: oops my 2nd post actually, the 1st was way back 2015  :D
- so I beg you tolerance if I woke up a sleeping thread or broke some forum rules
- just wanted to help

Ed
« Last Edit: November 28, 2017, 09:43:18 pm by EdCazini »