• Turn on your computer over the network via the command line. Wake On Lan – remotely turning on a computer via a local network

    Wake on LAN (WOL) is a technology that allows you to remotely turn on a computer via a local network or the Internet. (Wikipedia link:https://ru.wikipedia.org/wiki/Wake-on-LAN )

    Program to enable Wake on LAN: http://www.syslab.ru/wakeon

    To use the "Wake On Lan" technology ("Magic packet" technology), you must have:

    1. The equipment must comply with the ACPI specification and support for the "Wake On Lan" mode must be enabled in the BIOS settings.

    2. Have a block ATX power supply.

    3. Have a network card that supports Wake On Lan (WOL) technology.

    4. Configure Wake on LAN via Router. (setting examples)

    Settings

    1. Enable WOL in BIOS

    You can determine whether your computer's motherboard supports Wake On Lan. by going to the CMOS Setup settings in the power management settings section. Find the option there "Wake On Lan" and make sure it is enabled.

    Example: "Power - APM Configuration" AMI BIOS v2.61:

    To enable Wake On Lan mode, you must set the "Power On By PCI Devices" item to "Enabled"

    2. Settings linux For Wake On Lan

    - We putplastic bagethtool (apt-get install ethtool)

    - Checking whether the card supports “Supports Wake-On”

    ethtool eth0 | grep –i wake-on

    In line Supports Wake-On The mechanisms supported by the network card are listed. In my example, I use the so-called sending method. Magic Packet, and if you need the same, then make sure that in Supports Wake On there is a letter "g". Letter "d" in line Wake-on indicates that Wake On Lan for this network interface disabled. To enable it in Magic Packet recognition mode, you must:

    ethtool - s eth 0 wol g

    -

    approx. ifconfig eth0 | grep –i hwaddr

    Settings Windows ForWake On Lan

    - Click the Start key and search for “Computer Management.” Find your device from the list of devices network adapter. Right-click on it, select “Properties” from the menu, and then find the “Advanced” tab. Scroll down the list and find the next item “Wake on Magic Packet” or something like that, and set the value to “Enabled”. Click on the OK button when finished.

    - You will also need to know the MAC address of the network card ipconfig – all

    - The practice of using Wake On Lan has revealed another point - some computers, when enabling the network switching mode in the BIOS settings, turn on the power supply on their own, without even receiving a frame with the Magic Packet. The reason for this phenomenon is that some network cards (noted for Intel, 3COM) to turn on the power supply by local network they use not only WOL, but also other events (Wake on ARP, Wake on Link Change, etc.), and by default several inclusion criteria are used at once. You need to remove unnecessary conditions from the adapter settings (usually using a special utility), and everything will work correctly.

    Settings MACOS For Wake On Lan

    Open the window System Settings» (System Settings) and select Energy Saver. In the Options tab you should see the phrase “Wake on Ethernet” or something similar. This option enables the Wake-on-LAN feature.

    Settings FreeBSD ForWake On Lan

    With each release of FreeBSD, more and more network card drivers gain support for Wake-on-LAN.
    http://forums.freebsd.org/threads/wake-on-lan.28730/ (here we discuss how to insert a driver)

    3.Routers:

    a.ZYXEL:WakeonLAN via Internet Center seriesKeenetic(http://zyxel.ru/kb/2122)

    b.Router configuration exampleTP-Link:

    1. come in V chapter Forwarding->Virtual Servers

    2. will add “virtual server” indicate its IP address and port that will be used to enable it. Typically ports 7 and 9 are used for Wake-On-LAN, but you can also specify any other port (from 1 to 65535). Set the protocol type to UDP or ALL.

    3. Come in IP & MAC Binding->Binding Settings Turn on option Arp Binding .

    4. Add new entry for the computer that you will turn on remotely by specifying its IP and MAC addresses. Don't forget to also enable the option for it Bind.

    c.Router configuration examplemikrotik:

    Note: Bmikrotik has a built-in utilitytoolwol which allows you to turn on your computer directly from the router. (http://wiki.mikrotik.com/wiki/%D0%A0%D1%83%D0%BA%D0%BE%D0%B2%D0%BE%D0%B4%D1%81%D1%82%D0 %B2%D0%B0:%D0%98%D0%BD%D1%81%D1%82%D1%80%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D1% 8B_(Tools)/Wake-on-LAN )

    An example of setting up Mikrotik to turn on the computer viasyslab:

    1. Create a static entry in the ARP table for broadcast

    > /ip arp add address=192.168.1.254 disabled=no interface=bridge-local mac-address=FF:FF:FF:FF:FF:FF

    2. Create a static entry in the ARP table for the user’s computer

    Turn on your computer remotely, over a network or via the Internet - Wake On Lan

    Any modern network card and BIOS motherboard support technology that allows you to enable this computer remotely.

    How WOL works

    When the function is enabled, the computer, which is turned off normally (not in emergency mode), continues to supply standby power (5V with a small current) to the network card, which is in standby mode for just one packet - Magic packet(magic package). Upon receiving this packet, the network card sends a signal to turn on the computer.

    You can transfer this package using special program, for example WOL v2.0.3, or PHP script.

    Setting up the computer to turn on

    In the computer BIOS we enable Wake On Lan technology, this option is located in the power management section, and can be called (set to Power-On), Wake Up On LAN (to Enabled), Wake on LAN from S5 (to Power-On ), or ERP Support (to the Disabled position).


    Now, turning off the computer in the normal way, it will wait for the magic packet and turn on after receiving it.

    How to send a magic package

    To send the magic packet and then turn on the computer, you need to know MAC address(physical address) of the network card of the computer being turned on ().

    Since a switched off computer simply cannot have any IP address, it can only receive the packet in broadcast mode. A switched off computer also cannot respond to a TCP packet that requests a connection on the port and therefore, it is logical to assume that the packet must be UDP(although it doesn't matter). Port of destination in in this case not important network card will accept a magic packet on any port, but it is generally accepted 7th and 9th ports, the default ports for WOL. From the above it follows that the computer being turned on and the computer from which the packet is sent must be on the same network, otherwise the broadcast packet will most likely not leave the router (we’ll talk about turning on via the Internet later).

    As mentioned earlier, you can send a magic packet using a special program in which you only need to enter the MAC address of the computer you are turning on and its IP to create a broadcast on this network. For example, if the computer’s IP is 192.168.1.10, then the program will send to this IP and to the broadcast 192.168.1.255. And if you need to organize the switching on of computers online (via a browser), then this can be done using a PHP script.

    Wake On Lan via the Internet

    If you have direct connection to the Internet (via DHCP) and a dedicated IP address, and if your provider supports routing of broadcast packets, then your computer can be enabled to send a magic packet to the broadcast of your network, for example, your IP is 37.37.37.59, then you need to send the packet to the address 37.37 .37.255.

    But in most cases, for one reason or another it won't work, then you must have a router. A router connects to the Internet, and your computer connects to this router via cable. In this situation, the magic packet must be sent not broadcast, but to the external IP address of the router. And in the router you need to create a rule (port forwarding) in which to register the forwarding of the desired port (by default 7 and 9 for a magic packet, although you can send to any) from the WAN to the LAN to the broadcast, that is, to XXX.XXX.XXX.255 .

    But unfortunately, not all routers can forward ports to broadcast; some D-link models, all Linksys and Cisco, MikroTik routers, and, in my opinion, ZyXel can do this.

    Magic package structure

    A magic packet is a special sequence of bytes that normal operation sent by UDP protocol broadcast. At the beginning of the package there is 6 bytes equal to 0xFF and then goes MAC address repeated 16 times. Let's assume that the MAC address 00:1D:7D:E5:06:E8, then the magic package will look like this (without line breaks of course):

    FFFFFFFFFFFF
    001D7DE506E8
    001D7DE506E8
    001D7DE506E8
    001D7DE506E8
    001D7DE506E8
    001D7DE506E8
    001D7DE506E8
    001D7DE506E8
    001D7DE506E8
    001D7DE506E8
    001D7DE506E8
    001D7DE506E8
    001D7DE506E8
    001D7DE506E8
    001D7DE506E8
    001D7DE506E8

    Don't forget to leave

    Quite often it is necessary not only to access a home PC (laptop) from a work terminal or vice versa, but also to turn on the computer remotely. Many users, unfortunately, do not at all realize that it is quite easy to perform such actions if you know exactly how to set up such a connection using and standard means operating rooms Windows systems and third party software. Let us consider the main aspects and mandatory conditions associated with the possibility of organizing such access.

    Is it possible to enable it and why might it be needed?

    Yes, indeed, turn on a remote terminal located in the local or virtual network, Can. However, here you should immediately pay attention to the fact that in the case of stationary PCs, when the power is turned off (without an uninterruptible power supply installed), nothing will work, since no electricity will be supplied to the network card, which will be responsible for turning on the PC. With laptops in this regard, the situation is somewhat simpler, since in most cases users do not remove the battery.

    But why is it necessary to turn on your computer remotely? This is mainly due to situations where the user actually uses a connection to a remote “Desktop” to access all programs and functions of a computer or laptop that is not physically accessible. In other situations, turning on the remote terminal is completely impractical, and sometimes even completely unsafe.

    The simplest setup of remote access

    To begin with, let's briefly look at how to enable remote access to a computer in Windows in the sense of using the programs installed on it and the equipment that is used to process information.

    To do this, in the system properties you need to go to the section additional parameters, and then on the access tab activate network identification permission and in additional options enable terminal control permission. After this, in the basic information you will need to remember the full name of the computer and the user name, if several are registered.

    After this, on the device from which the connection will be made, you need to call the corresponding applet for connecting to the remote “Desktop”, enter the above data and activate the connection.

    Note: Please note that on a remote PCM or laptop, if you do not have a user password to log into the system, you will need to create one in the account management section. If the user has a Microsoft registration, then you can use it with equal success, which looks much simpler.

    How to turn on a computer remotely via the Internet or local network: mandatory requirements

    But the steps described above concerned gaining access to a remote PC only in cases when the terminal is in operating mode (turned on and the operating system is loaded). But how to enable remote access to a computer, and in such a way that you can turn on even a switched off PC or wake it up from sleep mode.

    To do this, you need to comply with several mandatory conditions. The following components must be installed on your computer:

    • motherboard supporting ATX (AVX) power supply;
    • network card with WOL (remote wake-up) support;
    • primary BIOS system or UEFI, which allows you to activate the necessary settings.

    Configuring BIOS/UEFI settings

    So, the first thing you need to do is activate the wake-up mode in the primary system. When you turn on your PC or laptop, enter the BIOS/UEFI settings using the Del key, other buttons, or combinations thereof (usually the entry method is indicated on the start screen).

    After that, find the power management section in the settings (something like Power Management), which should contain the Wake-on-LAN item or something similar). IN different systems the names may differ, but in any case they will be associated with either Wake or Power via network access(LAN).

    Set this option to Enabled. Sometimes in UEFI systems there may be wake-up points for both local (LAN) and wireless network(WLAN). Both can be enabled.

    After that, save the settings and exit.

    Network adapter configuration

    After the restart, you will need to configure your network adapter, which is responsible for turning on the remote PC. Go to the active network connections section by entering the ncpa.cpl command in the Run console, then go to properties. Next, select your card and click the settings button. Now comes the most important part!

    On the Power Management tab, set the options shown in the image above to active. After that, go to the “Advanced” tab and set the items shown in the picture below to enabled.

    Then in properties network connection Click the details button and write down the physical address of the computer you want to turn on (MAC address). As indicated, write down the full name of the terminal. In theory, this is enough to transmit a “magic” packet and turn on the computer remotely over a network or via the Internet.

    Note: if you assign a static IP to the terminal, it may also be required, but for dynamic IPs it is enough to know only the MAC address. To make sure that the selected adapter is active, simply turn off your computer. The indicator light on the network card should be blinking.

    Additional DNS and router settings

    In order to turn on a computer remotely over a local network with distributed dynamic addresses, you don’t need anything else. Just use the client remote access. But sometimes, in order to turn on the computer remotely, it is necessary to obtain dynamic DNS, for which you can use registration on the resource noip.com, after which the received address will need to be added to the router settings in the DDNS activation section, and in the DHCP server settings - add a reserved one list of "white" IP addresses.

    Also, on the child computer, you may need to create a new rule for incoming connections via UDP ports 7 and 9. If it is impossible to wake up on the child terminal in the power plan settings, just in case, deactivate the item quick launch(section “Configuring parameters that are currently unavailable”).

    Software

    To make your task easier, you can turn on your computer remotely using special utilities. Many people recommend using the TeamViewer client, but for the average user it may seem too complicated to set up.

    Much easier to use small program in which you need to enter the MAC remote terminal and specify the full name of the computer to be connected, and then simply press the wake up button. But TeamWiewer can be used both as a means of turning on a remote PC and as a client for connecting to a remote “Desktop”.

    13 Mar 2015

    Wake-on-Lan. Remotely turn on your computer

    With TeamViewer you can turn on your computer via Wake-on-LAN.

    This way, you can remotely control a computer that is disconnected from the network by waking it up before establishing a connection.

    I will talk about a method to wake up a computer using another computer on the same network.

    To do this we need to configure BIOS, Network Card, Firewall and TeamViewer.

    First you need to configure the BIOS. This procedure may vary depending on the type of computer.

    To enable Wake-On-LAN in BIOS, follow these steps::

    1. Start your computer.
    2. To access BIOS settings immediately after turning on, press the Del key (sometimes another, for example F2 or F1, F12) The BIOS settings window will open.
    3. Open the Power tab (“Power Management Setup”, or “ACPI Configuration”, etc.)
    4. Activate the option Wake-Up by PCI devices (or “Wake-on-LAN”, “Power on by Ethernet Card”, “Power by PCI”, etc.) for the network card built into the motherboard. If the network card is external, activate the Wake-Up by PCIE devices option.
    5. Select Save and Exit (F10).

    All other settings must be done in Windows. Log in with an administrator account.

    Firstly Let's configure the network card.

    Your computer's network card now supports Wake-On-LAN.

    Secondly setting up Firewall

    1. Open Control Panel
    2. Open Windows Firewall
    3. In the left pane, select Additional options
    4. In the Windows Firewall with Advanced Security dialog box, in the left pane, click Inbound Rules, and then in the right pane, click New Rule.
    5. The New Inbound Connection Rule Wizard opens.
    • Select “For port”
    • Click the “Next” button
    • Select “UDP protocol”
    • Check “Specific local ports” and write “7,9” (this means that you want to open port 7 and 9 for incoming connections)
    • Click the “Next” button
    • Leave the checkbox next to “Allow connection”
    • Click the “Next” button
    • Uncheck the box next to “Public”
    • Click the “Next” button
    • Give your rule a name, for example “WoL”
    • Click the “Done” button

    The firewall is configured.

    Thirdly you need to configure TeamViewer itself.

    First, let's associate the computer with the account.

    To ensure that only you can turn on the computer, you need to make sure that the computer really belongs to you. Therefore, you need to link your computer to your TeamViewer account. It is possible to wake up this computer only through the TeamViewer account associated with it.

    1. Launch TeamViewer on your computer.
    2. From the main menu, select Advanced | Options.

    → The TeamViewer Options dialog opens.

    1. Select the General section.
    2. In the Link to account section, click on the Link to account... button.
    3. The Link to Account dialog box opens. Enter Email address Your TeamViewer account in the E-Mail field.
    1. Enter your TeamViewer account password in the Password field.
    2. Click the Link button.
    3. Your computer is now assigned account TeamViewer.
    4. Do not close the settings, we will need them later.

    Now let's set up Wake-on-Lan via TeamViewer ID on the network.

    If the computer does not have a public address, you can also wake it from another

    computer via a local network. The other computer must be turned on and TeamViewer installed and configured to start when Windows starts.

    In this case, you can activate Wake-On-LAN capabilities over the local network. To do this, you will need to enter the TeamViewer ID of the computer on the network with which yours will be awakened. Thus, the wake-up signal will be sent through a specific turned on computer to the one that needs to be woken up/turned on.

    1. Find “Incoming connections (LAN)” under “Network settings” in the main TeamViewer settings, and change from “deactivated” to “accept”
    2. Now click on the “Configuration” button in the “Network Settings” section of the TeamViewer main settings.
    3. The Wake-on-LAN Feature dialog box opens. Select “Other TeamViewer applications on your network”
    4. In the TeamViewer ID field, enter the TeamViewer ID on your network with which the wake-up signal should be sent, and then click the “Add” button
    5. Click OK
    6. The computer can now be woken up using the saved TeamViewer ID.

    All that remains is to check if everything works. Open Computers and Contacts, right-click on the desired computer, the “Wake Up” button should appear, press (you can do it several times) and the computer will turn on!

    The instructions for you were compiled by Evgeniy Troshev.

    For more information and ordering services, you can call us from 9.00 to 19.00 (Mon-Fri) or leave a request for a call back!

    * Filling this form, You agree to the processing of personal data.

    +7 495 215-52-77 Mon-Fri 9.00-19.00

    © 2019 | KMK-SERVICE | Outsourcing and IT support
    INN/KPP 7728869840/772801001 OGRN 1147746122556

    Privacy Policy (as amended on 11/01/2013)

    We strive to respect the personal information regarding visitors to our website http://kmk.bz. This Privacy Policy explains some of the measures we take to protect your privacy.

    Confidentiality of personal information

    Obtaining private information. We receive private information about you, including information you provide when you register as a user, send us email, or sign up to receive emails. information messages from our website. “Personally identifiable information” means any information that can be used to identify an individual, such as name or email address.

    Use of private information

    Personally identifiable information collected in electronic registration forms is used by us, among other things, for the purposes of registering users, maintaining and improving our site, tracking policies and site usage statistics, and for purposes authorized by you. We also use personal information to communicate with you in other ways. For example, if you send us a message through this site, we may use your personal information to respond to it. We also use personal information to notify you about significant changes to this Privacy Policy.

    From time to time, we may invite users to provide information in the form of surveys or questionnaires. Participation in such surveys or opt-in lists is entirely voluntary, therefore the site user can decide whether to disclose the requested information. In addition to other purposes provided in this Privacy Policy, contact information received in connection with surveys or questionnaires is used to communicate survey or questionnaire results to you and to monitor or improve your use of and satisfaction with this site.

    Disclosure of Private Information

    We employ other companies or are affiliated with companies that provide services on our behalf, such as processing and delivering information, posting information on this site, delivering content and services provided by this site, performing statistical analysis. To enable these companies to provide these services, we may share personal information with them, but they will only be permitted to receive the personal information they need to provide the services. They are required to keep this information confidential and are prohibited from using it for other purposes.

    We may use or disclose your personal information for other reasons, including if we believe it is necessary to comply with the law or court orders, to protect our rights or property, or to protect the personal safety of users of our site or members of the general public. , to investigate or take action regarding illegal or suspected illegal activity, in connection with a corporate transaction such as a divestiture, merger, consolidation, sale of assets or in the unlikely event of bankruptcy, or for other purposes consistent with your consent.

    We may disclose the content of messages or requests, but we will not post or publish personally identifiable information and, except as provided in this Privacy Policy, such information will not be provided to third party service providers without your consent. We will not sell, rent or lease our user lists with email addresses to third parties.

    Access to personal information

    If, after providing information to this site, you decide that you do not want your Personal information was used for any purpose, you can remove yourself from the list of users of our site by contacting us at the following address: [email protected].

    Our Practices Regarding Non-Personal Information

    We may collect non-personal information about your visit to the site, including the pages you view, the links you click, and other activities in connection with your use of our site. In addition, we may collect certain standard information that your browser sends to any site you visit, such as your IP address, browser type and language, time spent on the site, and the address of the website in question.

    Using bookmarks (cookies)

    Cookie is small text file, placed on your hard drive by our server. Cookies contain information that can later be read by us. No data collected by us in this way can be used to identify a visitor to the site. Cookies cannot be used to run programs or infect your computer with viruses. We use cookies to monitor the use of our site, collect non-personal information about our users, store your preferences and other information on your computer in order to save you time by eliminating the need to repeatedly enter the same information, and to displaying your personalized content on your subsequent visits to our site. This information is also used for statistical studies aimed at adjusting content according to user preferences.

    Aggregated Information

    We may combine in a non-identifiable format the personal information you provide and the personal information provided by other users, thereby creating aggregate data. We plan to analyze aggregated data primarily for the purpose of tracking group trends. We do not link aggregated user data to personally identifiable information, so aggregated data cannot be used to contact or identify you. Instead of using actual names, we will use usernames during aggregate data creation and analysis. For statistical purposes and to track group trends, anonymous aggregated data may be provided to other companies with whom we interact.

    This Privacy Policy applies only to information collected by this site. This site may contain links to other sites that are not owned or controlled by us. We are not responsible for the privacy policies of such sites. When you leave our site, you should read the privacy statement of each site that collects personal information.

    Changes to this Privacy Statement

    We reserve the right to make changes or additions to this Privacy Policy, in part or in whole, from time to time. We encourage you to periodically review our Privacy Policy to stay informed about how we protect your personal information. The latest version of the Privacy Policy can be viewed by clicking on the “Privacy Policy” hypertext link located at the bottom home page of this site. In many cases, when we make changes to the Privacy Policy, we will also change the date at the beginning of the Privacy Policy, but we may not provide you with any other notice of changes. However, if there are material changes, we will notify you either by prominently posting a prior notice of such changes or by directly sending you notice at email. Your continued use of this site constitutes your acceptance of such changes.

    Contact us

    If you have any questions or concerns about our privacy statement, please contact us at the following address: [email protected]

    • Tutorial

    ...and also without port forwarding, SSH/telnet and installation third party applications. From any computer connected to the Internet and even from your phone!

    From time to time I need to turn on home computer when I'm not at home. Usually I didn’t bother and called or sent a message with such a request to my wife, who was sitting at home on maternity leave. Very convenient tool remote control with voice interface. However, this method has a number of disadvantages - she went for a walk, put the child to bed, or was busy with something else. I wanted simple solution from what is at hand.

    First of all, we enable Wake on LAN in the BIOS of the motherboard, everyone does it in their own way, for many it is enabled by default. On one of my PCs there is not even such an option - it is always enabled.

    Next, go to WinBox and connect to your router (if you want, you can via SSH or via HTTP(S), I do everything in WinBox). If you open the RouterOS text console and rummage around in the /tool ​​section there (or in the wiki manuals ), then you can find the wol utility with the following syntax:

    /tool ​​wol mac=XX:XX:XX:XX:XX:XX interface=ifname
    Where ifname is the name of the interface from which it will be sent magic package, XX:XX:XX:XX:XX:XX - mac address your computer.

    Everything seems simple, but Winbox doesn’t really launch from your phone and you’ll have a hard time entering the mac address from memory. You can launch SSH and send one single command to it, but this is also long and tedious. Let's use a firewall!

    It is impossible to launch command execution directly from the filter rules; of all the actions, adding an address to the address-list is most suitable for us, because it allows you to create new object V operating system router, accessible from scripts.

    Let's add a new rule for the input chain and place it among the other allowing rules in this chain. Let's indicate tcp protocol and dst-port - any of the top ports.

    Select the action add src (dst is also possible) to address list, specify the name of the sheet.


    We use a scheduler to track the appearance of entries. Go to System -> Sheduler, create a scheduler task, set a name. We indicate Start time: startup, and the desired interval, for example every 15 seconds.

    In the on event field we will write a simple script:

    :local WAKEPC :if ($WAKEPC!="") do=( /tool ​​wol mac=00:11:22:33:44:55 interface=bridge_lan /ip firewall address-list remove )
    Don't forget to specify the correct mac, interface name and address list. This script, when it detects elements in the address list, will execute a command that sends magic packets to your computer, after which it will delete the entry from the address list.

    To turn on your computer, just open your browser and go to the IP of your Mikrotik, indicating the port that we set in the firewall rule: http://your.router.net:port, after which the firewall creates an entry in the address list, the scheduler task will detect this entry, will launch the wol utility and delete the entry from the address list. Simpler than a steamed turnip, we can add the address to favorites so as not to enter it every time.

    Just don't forget about safety, this method is not protected by anything and anyone can turn on your computer, knowing or selecting the right port. For protection, you can use VPN, port knocking, whitelist or the Elusive Joe method - it’s up to you. If you need to turn on several computers separately in this way, create an appropriate number of rules on different ports, each of which will throw addresses into its own address list, we can also reproduce the script in the scheduler task using Ctrl+C, Ctrl+V, or create separate tasks for everyone - as you want.