Code Monkey home page Code Monkey logo

pf2opn's Introduction

pf2opn's People

Contributors

dependabot[bot] avatar mixman68 avatar mwood77 avatar ravnoor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pf2opn's Issues

CDATA markers not handled

Older versions of pfSense tend to wrap all user strings in CDATA markers, as follows:

      <descr>
        <![CDATA[User provided text goes here]]>
      </descr>

OPNsense doesn't know what to do with these and inserts a bunch of unwanted newlines and spaces around the user text on restore.

Firewall sections with multiple entries not converted correctly

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.

Firewall alias section broken

The entire alias section of the firewall configuration seems to be unparsed / not updated.

What it should be:

          <alias uuid="72b6208b-e50d-4d68-a594-da0fa6760000">
            <enabled>1</enabled>
            <name>MY_HOST</name>
            <type>host</type>
            <proto/>
            <interface/>
            <counters>0</counters>
            <updatefreq/>
            <content>19192.168.1.1</content>
            <categories/>
            <description>Entry added Mon, 01 Jan 1979 01:23:45 -0000</description>
          </alias>

What comes out:

    <alias>
      <name>MY_HOST</name>
      <type>host</type>
      <address>192.168.1.1</address>
      <descr></descr>
      <detail>Entry added Mon, 01 Jan 1979 01:23:45 -0000</detail>
    </alias>

Password from PFsense Backup Does Not Work After Opnsense Restore

I have a fairly basic backup that just has a lot of static DHCP mappings. I used my backup and then restored it to a fresh install of opnsense. After the install was complete the default user/pass no longer worked. I then attempted to use the user/pass from my pfsense backup and that also did not work.

I have checked both the before and after XML and the bcrypt-hash is the same.

e?.address.replaceAll is not a function

Hello

Just tried the product, and I have this error

main.e88ec901367bee90.js:1 ERROR TypeError: e?.address.replaceAll is not a function
at t.mapAliasEntity (main.e88ec901367bee90.js:1:244134)
at main.e88ec901367bee90.js:1:242827
at Array.forEach ()
at t.mapPFtoOPN (main.e88ec901367bee90.js:1:242803)
at o.onload (main.e88ec901367bee90.js:1:241830)
at v.invoke (polyfills.18a047f7d412b1c1.js:1:6562)
at Object.onInvoke (main.e88ec901367bee90.js:1:53367)
at v.invoke (polyfills.18a047f7d412b1c1.js:1:6502)
at L.runGuarded (polyfills.18a047f7d412b1c1.js:1:2066)
at FileReader. (polyfills.18a047f7d412b1c1.js:1:1

This Simply Doesn't Work.

This does not generate a usable XML file for OPNSense. Using version 23.7. Based on my manual review of the file, this does not work with earler versions, either.

We can start with line 1--the absence of in the download.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.