OPNsense Forum

International Forums => German - Deutsch => Topic started by: hsiewert on January 07, 2020, 09:30:10 AM

Title: Firewall synct auf falsches Interface (XMLRPC)
Post by: hsiewert on January 07, 2020, 09:30:10 AM
Hallo Zusammen,

ich habe zwei identische Firewalls.
Beide sind gleich aufgesetzt.

Die Interfaces sind auf beiden Kisten wie folgt zugewiesen:
LAN   -> ix2, vlan8
WAN  -> igb4
DMZ  -> ix3, vlan3
DSL   -> igb5
FA1    -> ix2, vlan10
SYNC  -> igb1
MGMT -> igb0
WLAN -> ix3, vlan11

Ich kann von beiden Knoten das jeweilige Interface der anderen Kiste pingen.

Wenn ich nun auf Knoten 1 die Synchronisation (XMLRPC) auf Knoten 2 aktiviere
werden die Regeln, wie erwartet von fw1 auf fw2 übertragen.
Aliasse, Einstellungen etc. passt alles bis auf die Interfaces MGMT und DMZ.
Hier werden die FW-Regeln, die auf fw1,MGMT eingestellt sind auf fw2,DMZ übertragen.

Kennt ihr das ?
Wann ja, was mache ich dagegen ?
Wonach muss ich schauen ?

LG



















Title: Re: Firewall synct auf falsches Interface (XMLRPC)
Post by: hsiewert on January 07, 2020, 10:44:40 AM
Oh ...
fw1 und fw2:
OPNsense 19.7.8-amd64
FreeBSD 11.2-RELEASE-p16-HBSD
OpenSSL 1.0.2t 10 Sep 2019
Title: Re: Firewall synct auf falsches Interface (XMLRPC)
Post by: hsiewert on January 31, 2020, 12:37:40 PM
Ich habe mir von beiden Maschinen das Backupfile mal gezogen:




FW1FW2
  <interfaces>
    <wan>
      <if>igb4</if>
      <descr/>
      <enable>1</enable>
      <spoofmac/>
      <ipaddr>62.x.x.x</ipaddr>
      <subnet>27</subnet>
      <ipaddrv6>2003:x:x::x</ipaddrv6>
      <subnetv6>48</subnetv6>
    </wan>
    <lan>
      <if>ix2_vlan8</if>
      <enable>1</enable>
      <ipaddr>172.20.16.2</ipaddr>
      <subnet>20</subnet>
      <ipaddrv6/>
      <subnetv6/>
      <gateway/>
      <gatewayv6/>
      <descr>LAN</descr>
    </lan>
    <opt1>
      <if>ix0_vlan10</if>
      <descr>1CC</descr>
      <enable>1</enable>
      <spoofmac/>
      <ipaddr>172.20.80.2</ipaddr>
      <subnet>20</subnet>
    </opt1>
    <opt2>
      <if>ix3_vlan3</if>
      <descr>DMZ</descr>
      <enable>1</enable>
      <spoofmac/>
      <ipaddr>172.20.32.252</ipaddr>
      <subnet>20</subnet>
    </opt2>
    <opt4>
      <if>igb0</if>
      <descr>MGMT</descr>
      <enable>1</enable>
      <spoofmac/>
      <ipaddr>172.20.96.1</ipaddr>
      <subnet>24</subnet>
    </opt4>
    <opt5>
      <if>igb1</if>
      <descr>pfSYNC</descr>
      <enable>1</enable>
      <spoofmac/>
      <ipaddr>10.0.0.1</ipaddr>
      <subnet>24</subnet>
      <ipaddrv6>fd00:4::1</ipaddrv6>
      <subnetv6>64</subnetv6>
    </opt5>
    <opt6>
      <if>igb5</if>
      <descr>WLAN</descr>
      <enable>1</enable>
      <spoofmac/>
      <ipaddr>172.20.48.2</ipaddr>
      <subnet>24</subnet>
    </opt6>
    <opt3>
      <if>igb2</if>
      <descr>WAN_DSL</descr>
      <enable>1</enable>
      <spoofmac/>
      <ipaddr>dhcp</ipaddr>
      <dhcphostname>root</dhcphostname>
      <alias-address/>
      <alias-subnet>32</alias-subnet>
      <dhcprejectfrom/>
      <adv_dhcp_pt_timeout/>
      <adv_dhcp_pt_retry/>
      <adv_dhcp_pt_select_timeout/>
      <adv_dhcp_pt_reboot/>
      <adv_dhcp_pt_backoff_cutoff/>
      <adv_dhcp_pt_initial_interval/>
      <adv_dhcp_pt_values>SavedCfg</adv_dhcp_pt_values>
      <adv_dhcp_send_options/>
      <adv_dhcp_request_options/>
      <adv_dhcp_required_options/>
      <adv_dhcp_option_modifiers/>
      <adv_dhcp_config_advanced/>
      <adv_dhcp_config_file_override/>
      <adv_dhcp_config_file_override_path/>
    </opt3>
    <openvpn>
      <internal_dynamic>1</internal_dynamic>
      <enable>1</enable>
      <if>openvpn</if>
      <descr>OpenVPN</descr>
      <type>group</type>
      <virtual>1</virtual>
    </openvpn>
    <enc0>
      <internal_dynamic>1</internal_dynamic>
      <enable>1</enable>
      <if>enc0</if>
      <descr>IPsec</descr>
      <type>none</type>
      <virtual>1</virtual>
    </enc0>
    <opt7>
      <descr>OPT7</descr>
      <if>ix1</if>
    </opt7>
  </interfaces>

  <interfaces>
    <lan>
      <if>ix2_vlan8</if>
      <enable>1</enable>
      <ipaddr>172.20.16.3</ipaddr>
      <subnet>20</subnet>
      <ipaddrv6/>
      <subnetv6/>
      <gateway/>
      <gatewayv6/>
    </lan>
    <wan>
      <if>igb4</if>
      <descr/>
      <enable>1</enable>
      <spoofmac/>
      <ipaddr>62.x.x.x</ipaddr>
      <subnet>27</subnet>
      <ipaddrv6>2003:x:x::x</ipaddrv6>
      <subnetv6>48</subnetv6>
    </wan>
    <opt1>
      <if>igb1</if>
      <descr>pfSYNC</descr>
      <enable>1</enable>
      <spoofmac/>
      <ipaddr>10.0.0.2</ipaddr>
      <subnet>24</subnet>
      <ipaddrv6>fd00:4::2</ipaddrv6>
      <subnetv6>64</subnetv6>
    </opt1>
    <opt2>
      <if>ix0_vlan10</if>
      <descr>1CC</descr>
      <enable>1</enable>
      <spoofmac/>
      <ipaddr>172.20.80.3</ipaddr>
      <subnet>20</subnet>
    </opt2>
    <opt3>
      <if>ix3_vlan3</if>
      <descr>DMZ</descr>
      <enable>1</enable>
      <spoofmac/>
      <ipaddr>172.20.32.253</ipaddr>
      <subnet>20</subnet>
    </opt3>
    <opt4>
      <if>igb2</if>
      <descr>WAN_DSL</descr>
      <enable>1</enable>
      <spoofmac/>
      <ipaddr>dhcp</ipaddr>
      <dhcphostname>root</dhcphostname>
      <alias-address/>
      <alias-subnet>32</alias-subnet>
      <dhcprejectfrom/>
      <adv_dhcp_pt_timeout/>
      <adv_dhcp_pt_retry/>
      <adv_dhcp_pt_select_timeout/>
      <adv_dhcp_pt_reboot/>
      <adv_dhcp_pt_backoff_cutoff/>
      <adv_dhcp_pt_initial_interval/>
      <adv_dhcp_pt_values>SavedCfg</adv_dhcp_pt_values>
      <adv_dhcp_send_options/>
      <adv_dhcp_request_options/>
      <adv_dhcp_required_options/>
      <adv_dhcp_option_modifiers/>
      <adv_dhcp_config_advanced/>
      <adv_dhcp_config_file_override/>
      <adv_dhcp_config_file_override_path/>
    </opt4>
    <opt5>
      <if>ix1</if>
      <descr>OPT7</descr>
      <spoofmac/>
    </opt5>
    <opt6>
      <if>igb5</if>
      <descr>WLAN</descr>
      <enable>1</enable>
      <spoofmac/>
      <ipaddr>172.20.48.3</ipaddr>
      <subnet>24</subnet>
    </opt6>
    <opt7>
      <if>igb0</if>
      <descr>MGMT</descr>
      <enable>1</enable>
      <spoofmac/>
      <ipaddr>172.20.96.3</ipaddr>
      <subnet>24</subnet>
    </opt7>
    <enc0>
      <internal_dynamic>1</internal_dynamic>
      <enable>1</enable>
      <if>enc0</if>
      <descr>IPsec</descr>
      <type>none</type>
      <virtual>1</virtual>
    </enc0>
    <openvpn>
      <internal_dynamic>1</internal_dynamic>
      <enable>1</enable>
      <if>openvpn</if>
      <descr>OpenVPN</descr>
      <type>group</type>
      <virtual>1</virtual>
    </openvpn>
  </interfaces>

Die 2. Firewall ist nun frisch aufgesetzt, das Problem besteht aber weiterhin.
Ich fürchte, der Sync referenziert nicht die selbst vergebenen Namen der Interfaces sondern die Systeminternen  Bezeichner: (LAN, WAN, OPT1, ... OPTn)

Ist das gewollt oder ein Bug ?

Title: Re: Firewall synct auf falsches Interface (XMLRPC)
Post by: hsiewert on January 31, 2020, 01:20:49 PM
So, nun sind die Interfaces komplett gleich und es tut, wie es soll.
Ich sollte die Doku genau lesen https://docs.opnsense.org/manual/how-tos/carp.html