SRX

 View Only
last person joined: yesterday 

Ask questions and share experiences about the SRX Series, vSRX, and cSRX.
  • 1.  junos op script request or wake on lan/magic packet question

    Posted 10-11-2011 07:58

    hello,

     

    i was wondering if anyone has a script or a way to do this already...or if someone would know how to make one to do this... but essentially, i would like to be able to wake up one of my computers from the CLI. so anything short of juniper integrating this functionality into junos, i am assuming this could be programmed into an op script.

     

    any help into the matter is helpful...

     

    alternatively, if anyone knows how to get it so that if i am VPN'd into my network (using dynamic-vpn), i can send a magic packet from my remote pc to the pc behind the firewall, that would be helpful as well.

     

    thanks in advance



  • 2.  RE: junos op script request or wake on lan/magic packet question
    Best Answer

    Posted 10-13-2011 08:05

    WOL will only work on the same broadcast domain, otherwise anyone could be waking up your machines from anywhere!!

     

    As for once you VPN into the SRX, you may be able to use the following to get the magic packet through:

     

    Config Target Broadcast:

     

    http://www.juniper.net/techpubs/en_US/junos10.2/information-products/topic-collections/config-guide-network-interfaces/topic-47130.html

     

    Understanding Target Broadcast:

     

    http://www.juniper.net/techpubs/en_US/junos10.2/information-products/topic-collections/config-guide-network-interfaces/topic-47092.html



  • 3.  RE: junos op script request or wake on lan/magic packet question

    Posted 10-14-2011 13:57

    its weird, i actually did some searching prior to creating this thread, and found the information on targeted broadcast. i committed the configuration, and it didnt work. in between then and now, i upgraded junos. before responding that i tried targed broadcast and saying it didnt work, i figured i would do my due dilligence and try it again. lo and behold, i just [essentially] rolled back the config (so i just re-included the targeted broadcast stuff i had in there before), and it works now. dont know if it was because of the newer junos version, or what. 

     

    either way, its fixed now, so thanks!



  • 4.  RE: junos op script request or wake on lan/magic packet question

    Posted 10-14-2011 14:01

    here is the relevant config for those interested:

     

    interfaces {
        ge-0/0/0 {
            description "to internet";
            unit 0 {
                family inet {
                    targeted-broadcast {
                        forward-and-send-to-re;
                    }
                }
            }
        }
        ge-0/0/1 {
            description "to switch / internal network";
            unit 0 {
                family inet {
                    targeted-broadcast {
                        forward-only;
                    }
                }
            }
        }
    }

     



  • 5.  RE: junos op script request or wake on lan/magic packet question

    Posted 08-09-2015 05:19
    and how you confirm those configuration on pp0.0 interface ?


  • 6.  RE: junos op script request or wake on lan/magic packet question

    Posted 01-05-2019 11:03

    Sure its easy way.

    But pay attention for my way. I think it more securely. By destination NAT.

    From outside I can start my home computers...

    in my case I made vlan over ''family ethernet-switching" inside - its my dmz...

     unit 1 {
                family inet {
                    targeted-broadcast {
                        forward-only;
                    }
                    address 172.16.76.1/24 {
                        arp 172.16.76.254 multicast-mac ff:ff:ff:ff:ff:ff publish;
                    }
                }
            }
    nat destination.... 

    pool wol_dmz {
    address 172.16.76.254/32 port 9;
    ------------------------------------------------
    rule wol_dmz { match { destination-address-name wan_ip; destination-port 12345; protocol udp; } then { destination-nat { pool { wol_dmz; } } } }
       policy wol_allow {
                    match {
                        source-address any;
                        destination-address dmz_wide;
                        application wol;
                    }
                    then {
                        permit;
                    }
                }

    For "wake on lan" for android I set:

    ip(domain): mydomain.com 

    port: 12345

    mac: personal for each device in my intranet (comp, server etc)

     

    It's working now.

     PS. Sure some "man in the middle" can define my intranet MAC's ,but what for?????