SRX

last person joined: 3 days ago 

Ask questions and share experiences about the SRX Series, vSRX, and cSRX.
Expand all | Collapse all

PIX/ASA to Junos converter

  • 1.  PIX/ASA to Junos converter

    Posted 11-13-2011 02:15
      |   view attached


    Attached is a PIX/ASA to SRX/Junos converter.


    It's written in Perl and has a few instructions
    included. I hope someone finds it useful.

    ...David

     


    #ASAconvert
    #translate
    #PIX

    Attachment(s)

    zip
    px2sx.zip   9 KB 1 version


  • 2.  RE: PIX/ASA to Junos converter

    Posted 11-17-2011 03:13
      |   view attached

    Minor version update - bug fixed in a core routine when newer versions of NetAddr::IP were used.

    Seems to work with older versions still, though.

     

    ...David

     

    Attachment(s)

    zip
    px2sx251.zip   9 KB 1 version


  • 3.  RE: PIX/ASA to Junos converter

    Posted 06-26-2012 15:00

    David -

     

    WoW! - What an awesome tool. I was doing some testing it ran an old pix 6.x config file and within seconds it converted all the objects and rules. I'm so physced to work more with this tool.

     

    I do need some help though. I ran a different PIX (version 8.03) config file and it errors out quickly with the below error. Any ideas?

     

    admin@ubuntu:~/hms$ perl px2sx.pl hmspix

    Starting conversion to Junos...


    Zones & Routes...
    Can't call method "network" on an undefined value at px2sx.pl line 83.

     

    Line 83 on the PIX config is simply a named object. Are there version limitations with the tool?

     



  • 4.  RE: PIX/ASA to Junos converter

    Posted 07-02-2012 21:25

    This sounds awesome but I am having a hell of a time getting it to work on WIndows 😕

     

    I have no knowledge of using Perl, but I grabbed a copy of ActivePerl community edition 5.14 and tried it out, it errored asking for NetAddr IP module. This is where I get lost 😞 Is there any simple instructions on doing this?



  • 5.  RE: PIX/ASA to Junos converter

    Posted 07-02-2012 22:05

    As with most of my experiences with code and unix installs you fix one tihng only to find another dependancy. I somehow managed to get IP.pm but now more issues:

     

    C:\temp\perl px2sx.pl asa.txt
    Can't locate auto/NetAddr/IP/Util/autosplit.ix in @INC (@INC contains: C:/Perl64
    /site/lib C:/Perl64/lib .) at C:/Perl64/lib/AutoLoader.pm line 173.
     at C:/Perl64/lib/NetAddr/IP/Util.pm line 9
    Can't locate NetAddr/IP/UtilPP.pm in @INC (@INC contains: C:/Perl64/site/lib C:/
    Perl64/lib .) at C:/Perl64/lib/NetAddr/IP/Util.pm line 105.
    Compilation failed in require at C:/Perl64/lib/NetAddr/IP/Lite.pm line 9.
    BEGIN failed--compilation aborted at C:/Perl64/lib/NetAddr/IP/Lite.pm line 28.
    Compilation failed in require at C:/Perl64/lib/NetAddr/IP.pm line 7.
    BEGIN failed--compilation aborted at C:/Perl64/lib/NetAddr/IP.pm line 7.
    Compilation failed in require at px2sx.pl line 16.
    BEGIN failed--compilation aborted at px2sx.pl line 16.

     



  • 6.  RE: PIX/ASA to Junos converter

    Posted 07-09-2012 23:43

    It's not hard - run up the Perl Package Manager (comes with ActivePerl) and mark the NetAddr-IP package for install.

    You might have to change the view to 'All Packages' first, and it does take a while to start up so patience is needed.

    5.14 should be OK - it uses the 'given - when' syntax so anything from 5.10 onwards should be OK.

     

     

    ...David

     



  • 7.  RE: PIX/ASA to Junos converter

    Posted 07-09-2012 23:35

    Yes - currently it doesn't handle version 8 NATs. But I've sorted out most of the other bugs, so it's probably time to upload a newer version.

     

     

    ...David

     



  • 8.  RE: PIX/ASA to Junos converter

    Posted 08-23-2012 15:35

    David, 

     

    can you help with converting ASA config to SRX ? it is kind of last minute urgent thing, can i send you a copy of the ASA configuration ? 

     



  • 9.  RE: PIX/ASA to Junos converter

    Posted 01-08-2013 13:30

    This is most excellent and saved me a lot of manual work. Thank you!

     



  • 10.  RE: PIX/ASA to Junos converter

    Posted 07-10-2012 18:49
      |   view attached

     

    Newer version. Some support for v8 config files now.

    Various bugs fixed & features added.

     

     

    ...David

     

    Attachment(s)

    zip
    px2sx258.zip   11 KB 1 version


  • 11.  RE: PIX/ASA to Junos converter

    Posted 07-13-2012 09:13

    hello my name is David Shariel mexico city, I need help converting a file from a Cisco Asa a Juniper SRX240.
    They could help



  • 12.  RE: PIX/ASA to Junos converter

    Posted 07-16-2012 19:07

    Thanks David that new version worked perfectly!

     

    I figured out my issue earlier with perl also - I was trying to get it to install on a machine that did not have direct Internet access. You'd never figure how hard it is to install modules for perl without Internet access 😞 In the end I just grabbed a laptop and used my celluar mobile access and installed it that way - easy as can be 🙂



  • 13.  RE: PIX/ASA to Junos converter

    Posted 07-18-2012 12:07

    Very nice script!!! When I run it I get the address books, zones, destination/static NAT, and routes, but an error on 506:

     

    Can't call method "within" on an undefined value at px2sx.pl line 506.

     

     

    Thanks,

     

    Nick

     



  • 14.  RE: PIX/ASA to Junos converter

    Posted 07-18-2012 12:49

    I receive a similar but slightly different error...

    Can't locate object method "within" via package "some object group in my pix config" (perhaps you forgot to load "some object group in my pix config"?) at px2sx.pl line 506.

     

    Any help would be apreciated.

     

    Ben



  • 15.  RE: PIX/ASA to Junos converter

    Posted 08-09-2012 16:19

     

    Line 506 is in a core function which works out which zone a given object is in.


    It's called not only directly from the main loops, but also from within another function.

     

    I'd need to see the (sanitised) config file that it fails on in order to sort it out.

     

    From what you describe it could be an object, network-object or access-list line.

     

    It's not been extensively tested on version 8 configs - I don't have a lot of examples.

     

     

    ...David

     



  • 16.  RE: PIX/ASA to Junos converter

    Posted 08-09-2012 16:31

    Hi David, I have a config that generates some minor errros to do with those DM_INLINE style group objects if you're interested in tweaking that.



  • 17.  RE: PIX/ASA to Junos converter

    Posted 08-09-2012 16:31

    Thinking about this... it implies that the zones file hasn't been built properly.

     

    In which case all I'd need to see would the the zones.txt output file,

    and maybe the static routes & interfaces sections from the config file.

     

     

    ...David

     



  • 18.  RE: PIX/ASA to Junos converter

    Posted 04-29-2013 01:30

    Dear David,

     

    I need to convert my cisco asa configuration to junos, but i am unable to use the conversion tool.

     

    I downloaded your tool and it's in winrar & when i extracted it i am unable to use px2sx file.

     

    Suggest me as i am new to this

     

    Steps would be great.

     

    Thanks in advance 🙂



  • 19.  RE: PIX/ASA to Junos converter

     
    Posted 05-01-2013 02:03

    The tool is a PERL script. To use it you need to have it on a machine that has perl installed on it.

     

    Here is a small howto to get perl installed under Windows.

    http://learn.perl.org/installing/windows.html

     

     

    you also need some perl "plugins" which you can install by using cpan (part of perl)

     

    cpan Getopt::Std

    cpan Scalar::Util

    cpan NetAddr::IP

     

     

    After this you can run "perl px2sx.pl"  in the path you have axctracted the px2sx.pl tool

     

     

     

     

     



  • 20.  RE: PIX/ASA to Junos converter

    Posted 09-21-2013 22:46

    Can you please input the first addin needed in all text?  It showed up with an emoticon in the name:

    cpan Getopt::smileyfrustrated:td

     

    thank Larry



  • 21.  RE: PIX/ASA to Junos converter

    Posted 03-26-2014 14:57

    For those getting the error on line 506, firstly, insert this after line 266 (the "foreach" line):

    	print("Line: $line");
    

     

    When it fails, you can tell what line it fails on.  Here's the problem...

     

    In the newer configs, the network objects defined under the object-group are "network-object object OBJECTNAME".  The script is looking for "network-object host OBJECTNAME", even if the object is a network.

     

    Objects defined as ranges don't work.  And nested groups don't work.

     

    Also, in the access-lists, "object" must be changed to "host", and lines that begin with a service "object smtp" need to be reformated to something like "permit tcp host whatever host whatever eq 25" so the port is at the end.  They can only begin with a service if it's an object-group.

     

    I manually fixed a config, and it took some time.  But, with the addition of the print statement above, I was able to tell where it failed.

     

    If anyone manages to fix the script, please post an updated version.  The email in the script for the original author doesn't seem to work.



  • 22.  RE: PIX/ASA to Junos converter

    Posted 09-22-2014 07:00

    Hi guys,

     

    any news about this topic?

     

    Does the perl script have fixed? I need to converto from PIX525 release 7.2 to srx650.

     

    Many thanks

     

    Antonio



  • 23.  RE: PIX/ASA to Junos converter

    Posted 06-03-2015 14:16

    Not sure if you've updated this tool recently but I'm using it to convert a FWSM config and it is helpful.

     

    Thank you!!!



  • 24.  RE: PIX/ASA to Junos converter

    Posted 08-08-2016 02:59

    Hello 

    Does it exist an update version at this time?????????



  • 25.  RE: PIX/ASA to Junos converter

    Posted 06-14-2013 12:43

    Thx a lot save my lots of time .....  🙂


    @DavidH wrote:


    Attached is a PIX/ASA to SRX/Junos converter.


    It's written in Perl and has a few instructions
    included. I hope someone finds it useful.

    ...David