I have been running a MikroTik RouterBoard in the house for a couple of months now (the RB750G) and I am very much loving the thing. But one thing you may need to do is setup VPN connections… Here are some tips on how to create a VPN Server and Client on your RouterBoard.
to setup a client, you need to do the following:
What does that all do? the first line creates an l2tp-client interface, pointing at “servername” with the username and password set. encryption, etc is enabled… Line 2 then enables the client. Line 3 sets all traffic comming from networkaddress/24 (for example, 192.168.0.1/24) to be sent though the VPN. any traffic going into networkaddress (same example) is not sent though the VPN. Line 4 creates a gateway, for all addresses (0.0.0.0/0) to use the VPN address. finally, NAT Masquerading is enabled on the VPN interface.
there are more advanced things you can set above… some examples I can think of are as follows:
- There should be no good reason to limit the amount of VPN connections you have… in theory, you could have multiple…
- for the mangle rule, set the src-address to a single machine in your network. that way, it gets VPN only connections. Also, you could set the dst-address to a single address or network to send only traffic going to a given server though the VPN… Example would be Netflix US traffic to a US VPN server, BBC iPlayer traffic to a UK VPN, etc.
- the example above uses L2TP, but PPTP, SSTP and OpenVPN are also available.
As mentioned above, L2TP, PPTP, SSTP and OpenVPN servers are available on RouterOs. Details on setting them up are available on MicroTik’s Wiki at the following locations:
Something I do on a regular basis is use the internet while “out and about”. This could be college, which has a semi open network, or it could be a coffee shop, which also usually has a semi open connection. There is also the possibility of using the a mobile internet connection on my iPhone, which can be slow, but at least its only shared with me… Anyway, over on RevSys.com, there is a post SSH Tunneling made simple which shows you how to open an SSH tunnel to your machine somewhere else (could be at home, as is my case, or a VPS/Dedicated server somewhere, or even on Amazon…) and use that for different things… In the case he shows, its for SMTP access. For my case, i am forwarding my local port 3128 to my Microsoft TMG 2010 Server in house on port 8080. Then my system proxy on my laptop is set to use localhost:3128 for all web and HTTPS requests. Very handy. One other tip: Using the -C flag, so your command may look like:
ssh [email protected] -L 3128:remoteMachine:8080 -C
will compress data between you and the SSH server, which for basic web browsing (HTML, CSS, JS) will make things faster, but for stuff like images, etc, may not work so well… Your Mileage may Vary…
Also, while on the subject of SSH, Linux Journal has an article on Eleven SSH tricks which mentions compression, Encryption Cyphers, X11 Forwarding, Config files and other interesting bits.
I have been very interested in VOIP stuff for the last while now, and finally started looking at implementing it in the house. Here are some links which may be useful. I will do a full post soon.
The main VOIP hardware I use is:
I also use the 3CX software on both my iPhone and Android.
A couple months back, I got my hands on a Raspberry Pi, a tiny development board that can run a full copy of Linux, has a HDMI port, a couple USB ports, Ethernet and a few other little bits and pieces. The full specs, from the Wikipedia Article are as follows:
- Operating system: Linux (Debian GNU/Linux, Fedora, and Arch Linux ARM)
- Power: 2.5 W (model A), 3.5 W (model B)
- CPU: ARM1176JZF-S (armv6k) 700 MHz
- Storage capacity: SD card slot (SD or SDHC card)
- Memory: 256 MByte
- Graphics: Broadcom VideoCore IV
There have been a few things i have wanted to play with it for, but have not implemented all them yet… still learning… but some interesting projects have come to my attention… here they are, in no particular order:
- Raspberry Pi embedded into a Canon 5D MKII Battery Grip: The idea of this is epic! the possibilities are endless… GPS, Wifi, FTP, Processing RAW images (ok, maybe not with a 700Mhz processor…), auto upload to the internet, auto add watermark, resize images before upload, send to iPad… I could go on and on…. 🙂
- Embedding a Raspberry Pi into a Keyboard: this is pretty cool too…
- Quick setup of a Web Server on the Raspberry PI: Install Apache, SSH, PHP, MySQL and an FTP server, all on your Pi!
In all fairness, the Pi makes a lot of ideas possible. with such a small size, and such a cheap price ($25-35), you are only limited by your imagination… Wonder could i get Windows 8 installed on one of these…
there are also a few interesting things that may make the Pi work more portable…
- LiPo Rider Pro: takes input from Batteries and Solar Panels and outputs as USB 5V. should run the Pi off solar and batteries for a while… 🙂
This site is built with GIT, GitoLite and Jekyll… I posted about this before. but how do you setup your own Git Server? checkout How to install and Setup a Git Repository Server using Gitolite on Linux Ubuntu 10.04 and 11.04 on mmncs.com. I am using Ubuntu 12.04, but its mostly the same…
So, Windows Server 2012 and Windows 8 have both RTMed in the last couple of weeks and will be available to the public in the next month or so (September for Server, October for Client). If you are an MSDN Subscriber, you already have Client, and will (hopefully) get server in the next couple of weeks… Fingers crossed… Anyway, one of the interesting features i am waiting for is [Storage Spaces]. Tim Anderson’s Gadget Writing blog has some information on [how Storage Spaces works]. handy notes on what to do and what not to do.
My new Favorite cross platform text editor is Sublime Text 2. It works on Windows, Mac OS and Linux, and i am very happy with it. My only problem is the path to start it is not exactly easy to type… So, with the help of PowerShell, my new favorite command line tool on Windows, i added an alias:
Set-Alias subl 'c:\program files\sublime text 2\sublime_text.exe'
I added this to my Microsoft.PowerShell_profile.ps1 file in Documents\WindowsPowerShell folder. If you don’t have one of these files, check out this Computer Performance.Co.UK post on Creating PowerShell profile files and then edit the file and add the line above… Now, I can edit files in PowerShell with Sublime Text 2 by typing:
I have a few Amazon EC2 instances running on a project, and one of these instances was known as the Zombie Instance! Every time i killed it, it came back to life a few min later… I found out that i, at some point, set that instance to be in an AutoScaling group. Any time the instance died, Amazon would check and restart the instance. So, how did I kill this undead instance? Check out “Auto Scaling with Amazon EC2 II” on LLOVIZNA’s blog. They had the same issue i had (trying to kill the Auto Scaling group gives an error) and figured out how to do it. Handy stuff. Now the instance is dead, and hopefully it wont come back any time soon… Mind you, When AutoScaling works correctly, it can be very cool indeed!
So, this site is brought to you by GIT, Jekyll and Magic… here is how i did it…
- I have a Linux VM running the site. Its an Ubuntu 12.04 server. On that i installed Jekyll.
- I also have gitolite installed for personal git repos.
- In the Git Repo for this site, under the hooks directory, I added a post-receive file which I got from here originally.
- Apache is set to serve the directory that Jekyll produces… That’s what you are reading here.
- If you are interested, you can find the code and config for this site on my github repo