SRX Services Gateway
Reply
Visitor
DavidH
Posts: 8
Registered: ‎02-09-2011

PIX/ASA to Junos converter


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

 

Visitor
DavidH
Posts: 8
Registered: ‎02-09-2011

Re: PIX/ASA to Junos converter

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

 

Contributor
M.Egan
Posts: 13
Registered: ‎11-22-2010
0

Re: PIX/ASA to Junos converter

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?

 

Contributor
bfranklin
Posts: 15
Registered: ‎05-17-2012
0

Re: PIX/ASA to Junos converter

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 :smileysad: Is there any simple instructions on doing this?

Contributor
bfranklin
Posts: 15
Registered: ‎05-17-2012
0

Re: PIX/ASA to Junos converter

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.

 

Visitor
DavidH
Posts: 8
Registered: ‎02-09-2011
0

Re: PIX/ASA to Junos converter

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

 

Visitor
DavidH
Posts: 8
Registered: ‎02-09-2011
0

Re: PIX/ASA to Junos converter

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

 

Visitor
DavidH
Posts: 8
Registered: ‎02-09-2011

Re: PIX/ASA to Junos converter

 

Newer version. Some support for v8 config files now.

Various bugs fixed & features added.

 

 

...David

 

sha
Visitor
sha
Posts: 2
Registered: ‎03-11-2012
0

Re: PIX/ASA to Junos converter

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

Contributor
bfranklin
Posts: 15
Registered: ‎05-17-2012
0

Re: PIX/ASA to Junos converter

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 :smileysad: In the end I just grabbed a laptop and used my celluar mobile access and installed it that way - easy as can be :smileyhappy:

Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.