This feature should be supported by both your motherboard and network adapter.
First of all, search the BIOS for the appropriate entry and enable it. It should look like this "PCI wake up".
Then, using ethtool (included in the ethtool package), you should determine if wol is supported by the network adapter and if it is enabled:
myrina:~# ethtool eth0 | grep Wake
Supports Wake-on: g
Wake-on: d
The output means that wake on is supported (g) but disabled (d). For more detailed information about the ethtool abbreviations take a look at the man page.
In order to enable this feature run:
# ethtool -s eth0 wol g
This setting will be reset once the machine gets restarted. Thus, it should be run on startup by a appropriate script.
In order to wake up the machine remotely the MAC address is required. The MAC address can be retrieved using the #ifconfig eth0 command.
On the client-side, a utility such as wakeonlan is required in order to send magic packets to the target machine. The syntax is very simple: $wakeonlan MACADDRESS
If you want to turn on a machine via the internet, you should use something like this
$wakeonlan -p (port) -i (external ip address) (macaddress)
I haven't tried to wake my machine via the internet but that should work. The router should be configured to forward traffic that reaches the port specifed in the command above. The default port for magic packets is 9.
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Tuesday, September 28, 2010
set up PPTP VPN server (debian linux)
On the server side:
remoteip 192.168.1.20-25
The localip address is the ip of the machine that pptpd runs on and the remoteip is the range of ips that will be used by the clients.
ms-dns 193.92.150.3
(use your isp's dns servers)
username pptpd password *


- First of all, you need to install the PPTP package (apt-get install pptpd).
- Then, you need to configure PPTP. In the /etc/pptpd.conf file add the following lines:
remoteip 192.168.1.20-25
The localip address is the ip of the machine that pptpd runs on and the remoteip is the range of ips that will be used by the clients.
- The DNS server should be added in the /etc/ppp/pptpd-options file. The entry should look like this:
ms-dns 193.92.150.3
(use your isp's dns servers)
- The vpn users should be declared in /etc/ppp/chap-secrets
username pptpd password *
- In order to avoid the error described in this bug report, in /etc/pptpd.conf comment the logwtmp line
- Ip forwarding needs to be enabled in /etc/sysctl.conf ; uncomment the net.ipv4.ip_forward=1 line.
- Restart pptpd (/etc/init.d/pptpd restart) and networking (/etc/init.d/networking restart)
- You should use a service like dyndns to get a hostname (unless you have a static ip anyway) and configure your router to forward port 1723 traffic to the server machine.
- Install the following packages: pptp-linux, network-manager-pptp , network-manager-pptp-gnome
- Open "edit connections" on network manager.
- On the VPN tab add a new PPTP connection.
- The gateway should be set to the external ip of the server machine (e.g. dyndns host account). The username and the password should be set as in the /etc/ppp/chap-secrets file
- In the Advanced options, enable the "use point-to-point encryption (MPPE)" option and MSCHAP and MSCHAP2 authentication methods.



- You should be able to connect now.
Labels:
debian,
debian testing,
linux,
pptp,
pptpd,
vpn server
Saturday, August 7, 2010
Debian: How to mount a windows samba share
A couple of days ago I was trying to use file space that my university provides on my laptop running debian linux. This guide does not only apply for the so-called "H: drive" of Imperial College but for all windows shares.
serverURL mountPoint smbfs username=XXXX,user,noauto 0 0
First of all, you need to install the following packages: smb-client and smbfs. Create a directory in your home directory that will be used for mounting the samba share. (mkdir ~/samba)
Then edit the /etc/fstab file by adding a row like this:
The username=XXXX part is for logging in to the remote sever. If no login is requred then it can be ommited. The user option allows for mounting the directoy without root privileges and noauto specifies that it won't be mounted automatically during startup.
The line should look like this:
//server/myDirectory/ /home/antonis/samba smbfs username=XXX,user,noauto 0 0
Then you can mount the directory using mount ~/samba. If a password is required you will prompted to type it. Once done unmount it by: umount ~/samba
Note: to access you Imperial H drive you should use the VPN service.
Wednesday, June 30, 2010
Imperial College printing from linux laptop
Well, this does not work perfectly for me and some problems may come up (e.g. when printing multiple pdf pages in a single page) but generally it works well. Strangely enough, there are instrunctions for this on the DoC's CSG old site but I couldn't find them on the new one. The old site's link is http://www.doc.ic.ac.uk/csg-old/ . click on the lab printers section and follow the instructions on the bottom of the screen. Basically, all you need to do is add the following lines at /etc/cups/printers.conf (replace username with your IC username): (https://www.doc.ic.ac.uk/csg-old/labprinters/printers.conf)
Restart cups and that should do the trick. The site suggests to also install the PPD file, you can do that, but as I metioned, I still got issues from time to time.
(tested on debian testing)
Subscribe to:
Posts (Atom)