Use Linux for remote office

Source: Internet
Author: User
Tags iptables linux

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.