Linux on the public network, the intranet has a computer, supporting the remote wake-up, Internet can be achieved through the control software remote office.
1. Installation wakelan-1.1.tar.gz
Tar wakelan-1.1.tar.gz
CD wakelan-1.1
./configure
Make
Make install
2. Add broadcast route
Route Add-host 255.255.255.255-deveth1 (my intranet machine is connected to the ETH1 network card)
For later Linux reboot can also implement automatic add route, need to modify/etc/rc.local
3. Install remote control software on the intranet Windows
I don't like to use pcanywhere, I use the radmin, this small and flexible.
4, configure DHCP, so that the intranet Windows machine can automatically get the correct IP after starting
ddns-update-style ad-hoc;
max-lease-time -1;
default-lease-time -1;
option subnet-mask 255.255.255.0;
option broadcast-address 255.255.255.255;
option routers 192.168.0.1;
option domain-name-servers 192.168.0.1,202.106.196.152;
option domain-name "home.net.cn";
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.2 192.168.0.100;
host platinum {
hardware ethernet 00:0a:e6:a9:64:a2;
fixed-address 192.168.0.2;
}
}
5, configure iptables, set Dnat function
Iptables-a prerouting-t nat-p tcp-s! 192.168.0.0/24--dport 4899-j Dnat--to 192.168.0.2:4899
This feature is to transfer all links to the LAN's 192.168.0.2 4899 port (excluding network) from the Linux machine TCP protocol 4899 port (Radmin's default service port is 4899)
In order to later Linux start with this feature, you can add to the/etc/rc.local.
You can also write a firewall script yourself and execute it in/etc/rc.local.
6. Start Remote Start
Log on to the Linux machine with ssh from anywhere you can access the Internet
Wakelan 00:0A:E6:A9:64:A2
7. Start Remote control
On a remote computer (installed Radmin client) access to the Linux machine, that is, the remote control shutdown can be achieved by radmin.