I haven't seen much of this around, and I'm not a network expert/sysadmin, so I need some advice. I have a laptop that I'd like to "protect" against theft (this is really a game more than a real security system to be honest, but it's fun to learn that way :) ):

It's pretty easy to configure postfix to send emails using a gmail account, and it's easy as well to write a cron task at the system level to send emails periodically with arbitrary contents.

If the laptop is connected to the Internet, what are the most useful network (or other?) information that I could send by e-mail to potentially locate the computer? How to get them, and how to format them to be sent by email?

closed as off-topic by mikewhatever, Luis Alvarado Jul 25 '14 at 2:04

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – mikewhatever, Luis Alvarado
If this question can be reworded to fit the rules in the help center, please edit the question.


There is many information that you could send in this case:

  • Public IP
  • Result of nmap, there's always "Tim's iPhone", "Herbert Müller-Desktop", "mrbrown.companyxy.net" if I make a quick scan in public networks
  • VOIP Configuration of the router
  • Username/ Password of the WAN connection of the router
  • Webcam picture ;)

There is a funny video from a hacker's conference, about a stolen pc from a hacker. The thief was caught because of the information the hacker collected by his remote.

In your case, i'd rather connect to one of my machines, whenever the notebook is turned on, so you can do what you want with your notebook, once connected:

ssh yourhomedesktop -R 2222:localhost:22

Now you can login to your notebook from yourhomedesktop like:

ssh localhost -p 2222

I would say the best info you can send to that e-mail is the public IP. You can use an script to retrieve it easily with:

wget -O - http://ip.tupeux.com | tail

This will write the public IP to the standard output (you can redirect it to a plaintext and send it trough email, or use another method.

With the public IP you can denounce and inform to the authorities, they may be able then to locate geographically your laptop.

  • Good idea, thank you :) Apparently though, using the IP to geolocate a computer is not very reliable, would you know by any chance what browsers use to geolocate the computer? – Sheljohn Jan 28 '14 at 23:39
  • 1
    Well that's the closest way I know to locate a PC. There's specialized software that I suppose will give more info, and can be used to remotely lock the PC, like this: preyproject.com/download (don't know if you have to pay for the software, or the company charges you for the traking). – animaletdesequia Jan 28 '14 at 23:47
  • 1
    @sh3ljohn, geolocation is actually done via a database lookup. There are free ones and paid ones with better resolution. The big boys (Google, Facebook, and their ilk) supplement this with their own data mining efforts via gps/phone/wifi scans. They can get really really accurate – Wayne Werner Jan 29 '14 at 2:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.