블로그 이미지
Flying Mr.Cheon youGom

Recent Comment»

Recent Post»

Recent Trackback»

« 2024/5 »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

 

'WOL'에 해당되는 글 2

  1. 2011.12.17 우분투 원격 부팅 설정
  2. 2011.06.01 WOL 원격부팅, 원격제어 방법
 

우분투 원격 부팅 설정

보안/서버관리 | 2011. 12. 17. 13:53 | Posted by youGom

ethtool -s eth0 wol g



-------------------------------------------------------------------------------------------------------

HOWTO: Set your system up for Wake On LAN (WOL)

This is really common, but I haven't seen a ubuntu howto for it, people more or less peice it together from posts and blog entries and the like.

So, here it goes. First off, make sure your system supports WakeOnLAN (WOL), if you know your system well, you already know if it does or doesn't.

--

Automatic way:
This script does everything described in the Manual way, for you, except step 1 and step 4.
------------------------

The automatic method is super dialup friendly! thanks to gzip compression the filesize is a mere 1.5kb! almost half the extracted size of 3.4kb!


1. If you havent already, go to your BIOS, and turn on WakeOnLAN (it varies, look for it.) If your network card is onboard, your set for step 2, otherwise there is probably a cable that should go from your network card to your motherboard, though this is not always the case.


Before continuing, note the interface you want to do this to. Most people know how to do this, if you do not, look at step 2a of the manual method.

2. Download and extract this: You can do it with the GUI and run the extracted program in a terminal by double clicking it, or open a terminal and do the following:

**** Removed dead link ****

3. As the exit of the program notes, now you just need to get/use a wake on lan sending program, like wakeonlan.

4. Sit on your lazy *** and have fun

--

Manual way:
------------------------
1. If you havent already, go to your BIOS, and turn on WakeOnLAN (it varies, look for it.) If your network card is onboard, your set for step 2, otherwise there is probably a cable that should go from your network card to your motherboard, though this is not always the case.

2. Back in ubuntu, kubuntu, xubuntu, w/e, we now need to make a script that will run every time the computer is started, because this command only lasts until the computer is turned on again once.

2a. Find out what network device you want to have the computer wake-able from, usually all, which is just one. If you have more network devices in your system, 9 chances out of 10, you already know what they are called.
You can NOT wake up a laptop or computer that is only connected via wireless with wake-on-lan, unless the bios has a method for this, this is very rare, and I do not garuntee this howto will work in such cases.
In your terminal, type:
Code:
ifconfig
You'll get something like: (I have removed my mac address for security)
Code:
eth0      Link encap:Ethernet  HWaddr 01:23:45:67:89:ab
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::215:f2ff:fe6f:3487/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:71495 errors:0 dropped:0 overruns:0 frame:0
          TX packets:76190 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:23164212 (22.0 MiB)  TX bytes:7625016 (7.2 MiB)
          Interrupt:217 Base address:0xd400

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1290 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1290 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:161182 (157.4 KiB)  TX bytes:161182 (157.4 KiB)
So, I want this system to be wake-able from eth0.

2b. Now we create the script.
Note: you must be an administrator on the system you are doing this to.
Code:
sudo -i
Enter your password at the prompt.
Change to the startup script directory and start editing a new file:
Code:
cd /etc/init.d/
pico wakeonlanconfig
Paste, or type this into the file, replacing eth0 with your network device, repeat the ethtool line as many times for your devices before the exit line:
Code:
#!/bin/bash
ethtool -s eth0 wol g
exit
Set the permissions of the file:
Code:
chmod a+x wakeonlanconfig
Make the script run on startup:
Code:
update-rc.d -f wakeonlanconfig defaults
You should see something like:
Code:
 Adding system startup for /etc/init.d/wakeonlanconfig ...
   /etc/rc0.d/K20wakeonlanconfig -> ../init.d/wakeonlanconfig
   /etc/rc1.d/K20wakeonlanconfig -> ../init.d/wakeonlanconfig
   /etc/rc6.d/K20wakeonlanconfig -> ../init.d/wakeonlanconfig
   /etc/rc2.d/S20wakeonlanconfig -> ../init.d/wakeonlanconfig
   /etc/rc3.d/S20wakeonlanconfig -> ../init.d/wakeonlanconfig
   /etc/rc4.d/S20wakeonlanconfig -> ../init.d/wakeonlanconfig
   /etc/rc5.d/S20wakeonlanconfig -> ../init.d/wakeonlanconfig
Now we finish by running it, and making sure there are no errors.
Code:
/etc/init.d/wakeonlanconfig
This should produce no output and put you right back at the prompt you started at.

3. Use it. you'll need something to send wake-on-lan packets with, "wakeonlan" is in the repos. And you'll need the mac address of the system.

To get your MAC address, on the same system you just enabled WOL on, type:
Code:
ifconfig | grep HW
its the thing that looks like 01:23:45:67:89:ab , write it down.
turn off that system:
Code:
sudo halt
if your using wakeonlan from the repos, and you are on the same network as the computer your tying to wake up, replace 01:23:45:67:89:ab with your mac address and do, from another computer:
Code:
wakeonlan 01:23:45:67:89:ab
In MOST cases, you CAN SEND wake on lan packets from a wireless connected computer.
If that doesnt work, its likely the port on the system your trying to wake up isnt the default (9), try 7, or if your BIOS settings or book told you one, use that one.
Code:
wakeonlan -p 7 01:23:45:67:89:ab
If that STILL doesnt work, make sure wakeonlan is enabled in your bios and your hardware supports it.

*Note: It has been said that you need to disable -i from halt, however I have never had to do this, nor do I know how.

4. Sit on your lazy *** and have fun

Feel free to post any questions, suggestions, problems and I will tend to them ASAP.

Added notes:
* For this to work, most systems must be shut down properly, ie: with the power button or halt, or any of the ways to shut down. Unclean power-offs (like a power outage or holding the power button for 5s) seem to stop WOL from working untill the system is powered on and shut down properly. Though, there my be a few exceptions. This is a hardware issue with the BIOS. In my opinion, WOL should work regardless of how the system is powered off, but thats not the case. I suggest, if you have frequent power outages, that you have your BIOS set to Power ON after a power failure, most new systems allow this.
:

WOL 원격부팅, 원격제어 방법

파워유저로 가는길 | 2011. 6. 1. 17:08 | Posted by youGom

원격부팅 프로그램:  WakeOnLanGui ( 다운로드 다른 곳 : http://blog.naver.com/PostView.nhn?blogId=kdkdata&logNo=110102103696 )

원격제어 프로그램: http://www.realvnc.com 

 

▣ 전원제어 방법은 3가지가 있음.

1. LAN 상에서의 WOL  -(외부인터넷 상태에서)

2. WAN 상에서의 WOL

3. 공유기가 설치된 경우 WOL  -(내부네트웍크 상태에서)

 

▣ 원격제어에 필요한 조건

1. WOL을 지원하는 메인보드 (거의 대부분 가능/부팅시 바이오스 설정을 해야 함)

2. WOL을 지원하는  LAN 카드 (윈도 설치시 자동으로 잡은 드라이브는 안되고 제조사에서 제공하는 드라이브 설치해야 함)

※ 참고: 온보드 랜카드의 경우 WOL을 대부분지원하는데 어떤 것은 '최대절전모드'로 종료해야만 WOL이 되는 것도 있음

 

▣ 소프트웨어

WakeOnLanGui : LAN 과 WAN에서 PC의 전원을 켤 수 있는 프로그램 (맨위에서 다운로드 링크 있음)

Real VNC 4.23  : LAN 과 WAN에서 PC를 원격제어할 수 있는 프로그램  http://www.realvnc.com 에서 구할 수 있음

 

▷ LAN 상에서의 내부 IP(공유기 사용시)를 사용한 Power ON (내부 네트웍크 상에서)

 

 

 

 

- 전원을 켤 PC에 장착된 랜카드의  맥어드레스를 적어준다.

- LAN IP(공유기에서 잡은 내부 IP)를 적어준다.

- 서브넷 주소을 적어준다.(끝은 0을 써준다.)

- Local Subnet을 선택한다.

-  8002(여기서는 원격포트번호는 별 의미가 없다.)

 

 

 

 

 

 

▷ WAN 상에서의 IP를 사용한 Power ON (외부에서)

 

  

 

 

- 전원을 켤 PC에 장착된 랜카드의 맥어드레스를 적어준다.

- WAN IP(외부 IP)를 적어준다.(인터넷 IP)

- 서브넷 주소을 적어준다. (끝은 255를 써준다.)

- Internet을 선택한다  //  - 공유기를 사용할 경우 공유기에서 부여한 내부 IP를 적는다.

-  8002

 

 

 

 

 

▷ WAN 상에서의 네임서버를 사용한 Power ON

 

 

 

 

 - 전원을 켤 PC에 장착된 랜카드의 맥어드레스를 적어준다.

- 네임서버를 적어준다 (아래에 설명 함)

- 서브넷 주소을 적어준다. (끝은 255를 써준다.)

- Internet을 선택한다  //  - 공유기를 사용할 경우 공유기에서 부여한 내부 IP를 적는다.

-  8002

 

 

 

 

☆ 네임서버의 사용

211.195.155.204와 같이 숫자로된 WAN IP의 주소는 외우기도 어렵고,

또한 유동 IP라서 수시로 바뀌게 된다.

그때마다 제어할 PC주소를 알아서 적어준다는 것은 매우 번거로운 일이므로

이를 고정 IP처럼 사용하여야 한다.

 

IP가 바뀔 때마다 자동으로 네임서버의 주소를 갱신해주는 서비스가 있다. 

 

www.dyndns.org에 가입하여 네임서버를 만들면 된다. [무료]

네임서버는 자신이 관리해야 하는 PC의 개수만큼 여러 개 만들 수도 있다.

 

☆ 자동으로 IP를 갱신하는 방법

공유기에 연결된 PC는 공유기의 DDNS 설정메뉴에서 네임서버주소를 설정해 주면

공유기가 자체적으로 주기적으로 IP를 갱신한다.

 

인터넷에 직접 연결된 PC에는 DDNS를 갱신해 주는 프로그램을 설치하면 된다.

dyndns.com 사용자의 경우에는 Service -> Dynamic DNS -> Update Client를

클릭하여 프로그램을 다운로드하여 설치하면 된다.

 

 

▣ WAN상에서의 원격제어

외부에서 원격부팅한 컴퓨터를 제어할 수 있는 있는 방법은 두가지이다.

1. 원격제어 프로그램 Real VNC (LAN 과 WAN에서 PC를 원격제어할 수 있는 프로그램  http://www.realvnc.com 에서 구할 수 있음)

    Real VNC는 원격데스크탑과 비슷한 원격 제어 프로그램이다.

    속도도 빠르고, 원격제어할 컴퓨터에 프로그램을 설치하면 그 컴퓨터의 ip만 알면 비밀번호 입력 후 접속하여 내 컴처럼 사용 가능하다.

 

2. VPN 구현이다. (ip time 공유기 등에서 제공하는 공유기 자체의 vpn 설정이 있다.)

   원격지의 네트워크와 동일상에 있는 것처럼 사용 가능하다.

  

각각 장단점은 있다. 용도에 따라 사용하면 좋겠다.

 

아래는 원격지 컴퓨터에 설치할 메인 프로그램과 접속해서 사용할 뷰어 프로그램이다.

 

 VNC Server

 

  

VNC Viewer

네임서버를 이용하여 원격 컴퓨터를 불러오기 위한 화면이다.





원문 : http://blog.daum.net/jun7101/7140566
 

: