Forums

Resolved
0 votes
Hi, I am evaluating ClearOS in a Multi-WAN config.

ClearOS iso: ClearOS-DVD-x86_64.iso
SHA256: b14201b3f62c875bef3e34062c6a3595dd9e8c57099902f9e92efbce728d609a
SHA1: 0d565c57e1343333945598921ecdc322181b22b3
MD5: eca0c2b745fe3ceef93e0278be681fb7

When at least one link is online there are firewall rules visible when I run iptables-save on the firewall.

But the ClearOS firewall rules appear to be cleared whenever both WAN links go off-line. This results in an insecure OPEN/ACCEPT state.

External attackers can ping and connect to my internal hosts if they know the internal IPs.

I have tested it in this configuration:

Internal Client-> eth0-ClearOS

ClearOS-eth1->WAN1->WAN4->Internet
ClearOS-eth2 ->WAN2->WAN3->Internet

ip forwarding enabled on WAN1 and WAN2
ip forwarding disabled on WAN4 and WAN3 to force both links offline

From WAN4 I can ping and make connections to the Internal Client.

This is an insecure behavior for a firewall.

Example output of iptables-save when both WAN links go offline:

# Generated by iptables-save v1.4.21 on Wed Oct 4 13:26:49 2017
*nat
:PREROUTING ACCEPT [40636:5341715]
:INPUT ACCEPT [3718:407234]
:OUTPUT ACCEPT [3985:280750]
:POSTROUTING ACCEPT [4786:335856]
COMMIT
# Completed on Wed Oct 4 13:26:49 2017
# Generated by iptables-save v1.4.21 on Wed Oct 4 13:26:49 2017
*mangle
:PREROUTING ACCEPT [88050:9410893]
:INPUT ACCEPT [21621:2582293]
:FORWARD ACCEPT [30312:1949225]
:OUTPUT ACCEPT [10330:2402776]
:POSTROUTING ACCEPT [40648:4354069]
COMMIT
# Completed on Wed Oct 4 13:26:49 2017
# Generated by iptables-save v1.4.21 on Wed Oct 4 13:26:49 2017
*filter
:INPUT ACCEPT [21621:2582293]
:FORWARD ACCEPT [30312:1949225]
:OUTPUT ACCEPT [10330:2402776]
COMMIT
# Completed on Wed Oct 4 13:26:49 2017
Wednesday, October 04 2017, 05:48 AM
Share this post:
Responses (4)
  • Accepted Answer

    Wednesday, October 04 2017, 07:37 PM - #Permalink
    Resolved
    -1 votes
    The ClearOS firewall operation is probably very different from what you may imagine, and when I last looked, it restarts quite frequently on its own. It will restart every time the WAN IP changes; if you change a firewall rule, I think it restarts (especially if you delete one); network changes force a restart; it restarted 9 times during the upgrade to 7.4 beta; it restarts if you edit /etc/clearos/firewall.d/local and so on. I would have thought it would be very difficult to change the behaviour because of the way it is integrated into so many functions. Also, for what it is worth, it does not use the iptables-save command!
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, October 04 2017, 09:38 AM - #Permalink
    Resolved
    0 votes
    A WAN link/gateway can appear offline to ClearOS while the WAN devices are still online.

    As already mentioned WAN3 and WAN4 stop ClearOS's WAN status checks from succeeding but WAN3 and WAN4 remain up.

    I suspect there's no need to completely turn off packet forwarding to prevent the WAN status checks from succeeding, you just have to block the status check traffic while letting other traffic through.

    The main questions are:
    1) Why are my ClearOS firewall rules being cleared in such a scenario? The rules are restored whenever ClearOS thinks at least one link is up. So why even clear them?

    2) How do I prevent ClearOS from clearing the firewall rules in such scenarios while allowing ClearOS to function well enough as a Multi-WAN firewall and load balancer?
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, October 04 2017, 08:25 AM - #Permalink
    Resolved
    -1 votes
    You have to be clear here about which 'Offline' is being referenced...

    Multi-WAN has both Network Status and Multi-WAN Status

    An external multi-WAN interface can be Network Status 'Online' but Multi-WAN status 'Offline' - in that situation it still responds to pings! Just tried it...
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, October 04 2017, 07:03 AM - #Permalink
    Resolved
    -1 votes
    I am confused here. If all your WAN's are offline, how is accepting all traffic insecure? The WANs at that point are, by definition, safe.
    The reply is currently minimized Show
Your Reply