Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firewall sections with multiple entries not converted correctly #22

Closed
madscientist159 opened this issue Mar 30, 2024 · 2 comments
Closed

Comments

@madscientist159
Copy link

madscientist159 commented Mar 30, 2024

PFsense and OPNsense differ in how multiple entries (e.g. in an alias block) are formatted.

PFsense:

		<alias>
			<name>DescriptiveAliasNameGoesHere</name>
			<type>host</type>
			<address>192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 192.168.4.0/24</address>
			<descr></descr>
			<detail><![CDATA[Entry added Fri, 01 Jan 1979 01:23:45 -0000]]></detail>
		</alias>

OPNsense:

          <alias uuid="abcdef12-3456-789a-bcde-f0123456789a">
            <enabled>1</enabled>
            <name>DescriptiveAliasNameGoesHere</name>
            <type>network</type>
            <proto/>
            <interface/>
            <counters/>
            <updatefreq/>
            <content>192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
192.168.4.0/24</content>
            <categories/>
            <description/>
          </alias>

pf2opn doesn't reformat the data in the address block, leading to a very subtle problem -- OPNsense appears to import the data correctly (and shows what appears to be a correct IP listing on the administration panel), but actually treats the IPs as a long text string (i.e. alias) instead of a list of separate IPs.

@mwood77
Copy link
Owner

mwood77 commented Mar 30, 2024

I'll address this issue first as it appears more pressing.

I've added a dedicated mapper to handle the parent <aliases> and <alias> tags in #23 .

If you're willing to check the output, you can try the development branch here:

@mwood77
Copy link
Owner

mwood77 commented Apr 3, 2024

#23 has now been merged, so I'm going to close this issue. If the issue persists, please re-open this.

@mwood77 mwood77 closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants