SRX

 View Only
last person joined: yesterday 

Ask questions and share experiences about the SRX Series, vSRX, and cSRX.
  • 1.  [SOLVED] Map outgoing traffic to certain IP (SRX 100)

    Posted 04-15-2014 02:17

    Hello, I am trying to map outgoing traffic from inner host to one of my outer IP adresses.

    For example:

    isp addr: 172.17.20.15 - 172.17.20.20

    192.168.1.18 -> 172.17.20.18 as outgoing

    all other hosts in 192.168.1.0/24 network should be mapped to 172.17.20.15

    As for now I have got default source nat like:

    rule-set nsw_srcnat {
        from zone Internal;
        to zone Internet;
        rule nsw-src-interface {
        match {
             source-address 0.0.0.0/0;
             destination-address 0.0.0.0/0;
        }
        then {
             source-nat {
            interface;
             }
       }
       }
     }

    I can't figure out how to do it 😞


    #sourcenat


  • 2.  RE: [SOLVED] Map outgoing traffic to certain IP (SRX 100)
    Best Answer

     
    Posted 04-15-2014 02:31

    When you have a range of ip-address, you could use pool based source NAT.

     

    Below pdf has got examples for different scenarios:

     

    http://kb.juniper.net/library/CUSTOMERSERVICE/technotes/Junos_NAT_Examples.pdf

     

    http://kb.juniper.net/InfoCenter/index?page=content&id=TN81

     

    Regards,

    Raveen



  • 3.  RE: [SOLVED] Map outgoing traffic to certain IP (SRX 100)

    Posted 04-15-2014 05:18

    This works, but is it possible to make something like this:

    192.168.15.15/32 to-source 85.5.15.16

    0.0.0.0/0 to-source 85.5.15.15

    I dont like the idea of manually writing rules for every local subnet/



  • 4.  RE: [SOLVED] Map outgoing traffic to certain IP (SRX 100)

    Posted 04-15-2014 19:04

    yes, yo need to create 2 rules and 2 pols.

    Rule A match source 192.168.15.15/32 - map it pool a which would contain -- 85.5.15.16

    Rule B match source 0/0 (any) - map it to pool b which would contain - 85.5.15.15

    Make sure Rule A is placed above Rule B.

     

    This would work.

     

    Regards.
    c_r
    Note: If this answers your question, you could mark this post as accepted solution, that way it helps others as well.
    Kudos will be cool if I earned it!

     



  • 5.  RE: [SOLVED] Map outgoing traffic to certain IP (SRX 100)

     
    Posted 04-15-2014 19:20

    For your existing requirement, you need to create two rules.

    In future if you requirement is to map multiple subnet to multiple IPs, then you need rules per subnet.

     

    Regards,

    Raveen



  • 6.  RE: [SOLVED] Map outgoing traffic to certain IP (SRX 100)

    Posted 04-15-2014 21:20

    Than you for your replies.