SRX

last person joined: yesterday 

Ask questions and share experiences about the SRX Series, vSRX, and cSRX.
  • 1.  How can I add multiple lines of config -- on one line?

    Posted 06-12-2015 10:43

    I'm working on converting some ACL's and need to know if I can enter (for example) the following LINES into ONE LINE of input into a Juniper SRX...

     

    set security policies from-zone zone1 to-zone zone2 policy test-policy

    set match source-address 1.1.1.1 destination-address 2.2.2.2 application junos-http

    set then permit

    set then log session-init session-close

    top

     

    and then have my second rule here etc etc

     

    I realize this would be doable by creating a rather large file with multiple lines per rule, but I'm working with tens of thousands of ACL's and I actually have limited resources to do this conversion with.  It would greatly improve my ability if I could input those 5 lines as a single line.

     

    --

     

    Any help is appreciated.



  • 2.  RE: How can I add multiple lines of config -- on one line?

    Posted 06-12-2015 11:11

    have you used "load set terminal" ?



  • 3.  RE: How can I add multiple lines of config -- on one line?

    Posted 06-12-2015 11:16

    I have not used that -- I will look into what that is right now.



  • 4.  RE: How can I add multiple lines of config -- on one line?

    Posted 06-12-2015 11:18

    Yeah that is the way to do a bulk paste, other than that transferring a file and using the appropriate load command is your best bet.



  • 5.  RE: How can I add multiple lines of config -- on one line?

    Posted 06-12-2015 11:19

    Interesting -- I'll keep that in mind, that is probably the route I will go -- to merge it in from a text file.

     

    Honestly, I could spend the next 2 weeks thinking of how to do this and still have it done faster than doing it the way it was proposed I do it.

     

    --

     

    I've already got excel spitting out the lines I need -- I just don't know how to get excel B1, C1, D1, E1 to all be seperate lines.  If I could figure that out, I could use the previously-mentioned command and enter the configuration that way.



  • 6.  RE: How can I add multiple lines of config -- on one line?

    Posted 06-12-2015 11:54

    Well, it's probably more work than you want if you're starting from square 1 but C# can pull from excel and you could write a pretty short program to do what you want. Convert your excel into junos set syntax.

     

    Might be a way to do it with built in languages in excel, I'm sure there is, would have to ask an excel geek.

     

    set policy name <Cell A1 text> match source-address <Cell A2>

    set policy name <Cell A1 text> match source-address <Cell A3>

     

    etc



  • 7.  RE: How can I add multiple lines of config -- on one line?

    Posted 06-12-2015 12:25

    Hi,

     

    You can use a "load merge terminal relative" to put a part of config done in another editor, like notepad.

     

    Regards,



  • 8.  RE: How can I add multiple lines of config -- on one line?

    Posted 06-12-2015 12:52

    OK Thanks for the assistance.  I'll be looking into this over the weekend.