SRX

last person joined: 4 days ago 

Ask questions and share experiences about the SRX Series, vSRX, and cSRX.
  • 1.  [JSRX 210] How to completly remove/delete destination NAT?

    Posted 01-27-2017 14:39

    Recently I configured my JSRX210 with the following destination NAT rules:

     

    edit security
    set zones security-zone trust address-book address companyserver1 y.y.y.y/32
    exit
    
    edit security policies from-zone untrust to-zone trust
    set policy companyserver1-access match source-address any destination-address [ companyserver1 ] application any
    set policy companyserver1-access then permit
    exit
    
    edit security nat destination
    set pool dst-nat-pool-1 address y.y.y.y port 443
    set rule-set rs1 from zone untrust
    set rule-set rs1 rule r1 match destination-address x.x.x.x
    set rule-set rs1 rule r1 match destination-port 443
    set rule-set rs1 rule r1 then destination-nat pool dst-nat-pool-1
    exit
    
    edit security nat
    set proxy-arp interface ge-0/0/0.0 address x.x.x.x
    
    commit confirmed 60
    commit
    
    edit security nat destination
    set pool companyserver1-dst-nat-pool-1 address y.y.y.y port 1110
    set rule-set rs1 from zone untrust
    set rule-set rs1 rule r2 match destination-address x.x.x.x
    set rule-set rs1 rule r2 match destination-port 1110
    set rule-set rs1 rule r2 then destination-nat pool companyserver1-dst-nat-pool-1
    
    commit confirmed 60
    commit

     

    And I need to completly remove the changes I made. I know I can simply rollback to prevoius config, but the thing is, I haven't saved it. I do not want to restore default config either.

     

    Is there a simple set of commands, which will let me just revert the changes I made, delete / remove the rule sets, pooles, the whole destination NAT I made? Thank you.



  • 2.  RE: [JSRX 210] How to completly remove/delete destination NAT?
    Best Answer

     
    Posted 01-27-2017 19:34

    @tk2 wrote:

    I know I can simply rollback to prevoius config, but the thing is, I haven't saved it.


    What does this mean? Your config is saved when you commit. You can do a rollback 4 and commit.

     

    Otherwise

     

    edit security
    del zones security-zone trust address-book address companyserver1 y.y.y.y/32
    exit
    
    edit security policies from-zone untrust to-zone trust
    del policy companyserver1-access match source-address any destination-address [ companyserver1 ] application any
    del policy companyserver1-access then permit
    exit
    
    edit security nat destination
    del pool dst-nat-pool-1 address y.y.y.y port 443
    del rule-set rs1 from zone untrust
    del rule-set rs1 rule r1 match destination-address x.x.x.x
    del rule-set rs1 rule r1 match destination-port 443
    del rule-set rs1 rule r1 then destination-nat pool dst-nat-pool-1
    exit
    
    edit security nat
    del proxy-arp interface ge-0/0/0.0 address x.x.x.x
    exit
    
    edit security nat destination
    del pool companyserver1-dst-nat-pool-1 address y.y.y.y port 1110
    del rule-set rs1 from zone untrust
    del rule-set rs1 rule r2 match destination-address x.x.x.x
    del rule-set rs1 rule r2 match destination-port 1110
    del rule-set rs1 rule r2 then destination-nat pool companyserver1-dst-nat-pool-1
    
    commit
    


  • 3.  RE: [JSRX 210] How to completly remove/delete destination NAT?

    Posted 01-30-2017 08:45

    It worked, thank you!