<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>A Million Monkeys</title>
	<atom:link href="http://www.monkeedev.co.uk/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.monkeedev.co.uk/blog</link>
	<description>How to survive IT in the travel industry.</description>
	<pubDate>Fri, 28 Dec 2007 07:58:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting up a debian PPTP VPN</title>
		<link>http://www.monkeedev.co.uk/blog/2007/08/10/setting-up-a-debian-pptp-vpn/</link>
		<comments>http://www.monkeedev.co.uk/blog/2007/08/10/setting-up-a-debian-pptp-vpn/#comments</comments>
		<pubDate>Fri, 10 Aug 2007 21:36:50 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://www.monkeedev.co.uk/blog/2007/08/10/setting-up-a-debian-pptp-vpn/</guid>
		<description><![CDATA[This article follows on from my hamachi based VPN tutorial. PPTP is much easier to set up on a debian server, and very easy to connect to from a Windows XP machine.
With the ease of use though, there are some downfalls. PPTP is known to be less secure than other VPN&#8217;s such as OpenVPN and [...]]]></description>
			<content:encoded><![CDATA[<p>This article follows on from my <a href="http://www.monkeedev.co.uk/blog/2007/06/22/setting-up-a-hamachi-vpn/">hamachi based VPN</a> tutorial. PPTP is much easier to set up on a debian server, and very easy to connect to from a Windows XP machine.</p>
<p>With the ease of use though, there are some downfalls. PPTP is known to be less secure than other VPN&#8217;s such as OpenVPN and IPSEC, but for most uses it should be fine. One advantage over my hamachi VPN is that you will end up with an IP on the remote LAN (instead of the 5.0.0.0/8 address you have from hamachi), meaning you don&#8217;t need to do any routing tweaks.</p>
<p>First, set up the server:</p>
<blockquote><p><em>apt-get install pptpd</em></p></blockquote>
<p>That&#8217;s it! Now, to configure, you just need to edit 2 files:</p>
<blockquote><p>/etc/pptpd.conf<br />
Just add 2 lines to the bottom of the file, for the internal IP address of the server, and a range of IP&#8217;s which the remote connections will use.<br />
<em>localip 10.1.0.50<br />
remoteip 10.1.0.90-99</em></p></blockquote>
<p>The comments at the bottom of the file show some other ways of assigning ranges of IP&#8217;s in the remoteip section.</p>
<p>Finally, to add a user, edit /etc/ppp/chap-secrets and add a line for a remote user in the format:</p>
<blockquote><p>username pptpd password *</p></blockquote>
<p>To limit connections from specific hosts, use them instead of the * at the end.</p>
<p>To set up the connection on a windows XP client, do the following (from Control Panel):</p>
<blockquote><p> <em>Network Connections</em><br />
Create a New Connection<br />
Next<br />
Connect to the network at my workplace<br />
Virtual Private Network connection<br />
Enter your connection name<br />
Do not dial the initial connection<br />
Enter the IP of your server</p></blockquote>
<p>Then run the connection with the username and password you entered into /etc/ppp/chap-secrets</p>
<p>By default this will route all your traffic (including normal web browsing) through the tunnel. If you don&#8217;t want this, go to the connection properties, then the networking tab. Choose TCP/IP properties, and click &#8216;Advanced&#8217;, then finally untick the &#8216;Use default gateway on remote network&#8217; tickbox.</p>
<p>That should be all you need.</p>
<p>Soon, I&#8217;ll give OpenVPN a try, and try to write up a nice guide here.</p>
<p>Most of the information above came from other sites, and by googling. If anyone knows of a better or more secure way of using PPTP then please post comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monkeedev.co.uk/blog/2007/08/10/setting-up-a-debian-pptp-vpn/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Command line bittorrent in linux</title>
		<link>http://www.monkeedev.co.uk/blog/2007/07/12/command-line-bittorrent-in-linux/</link>
		<comments>http://www.monkeedev.co.uk/blog/2007/07/12/command-line-bittorrent-in-linux/#comments</comments>
		<pubDate>Thu, 12 Jul 2007 20:43:16 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://www.monkeedev.co.uk/blog/2007/07/12/command-line-bittorrent-in-linux/</guid>
		<description><![CDATA[Installing bittorrent for linux is pretty easy, and it enables you to download torrents from the command line. This works for Debian Etch.
I&#8217;ll also give instructions for using screen to keep downloads going when you logout of the machine.
1, Install the dependancies and other useful packages:
# sudo apt-get install python-wxgtk2.6 python-twisted python-crypto python-psyco python-zopeinterface screen
2, [...]]]></description>
			<content:encoded><![CDATA[<p>Installing bittorrent for linux is pretty easy, and it enables you to download torrents from the command line. This works for Debian Etch.</p>
<p>I&#8217;ll also give instructions for using screen to keep downloads going when you logout of the machine.</p>
<p>1, Install the dependancies and other useful packages:</p>
<blockquote><p># sudo apt-get install python-wxgtk2.6 python-twisted python-crypto python-psyco python-zopeinterface screen</p></blockquote>
<p>2, Get the bittorrent .deb file</p>
<blockquote><p># wget http://download.bittorrent.com/dl/bittorrent_5.0.8_python2.4.deb<br />
# dpkg -i bittorrent_5.0.8_python2.4.deb</p></blockquote>
<p>3, Download torrents!</p>
<p>You&#8217;ve now got a command line, and curses interface for bittorrent installed. To download a file, run:</p>
<blockquote><p># bittorrent-curses http://path/to/file.torrent<br />
(you can also use local paths for torrent files).</p></blockquote>
<p>To use the command line interface:</p>
<blockquote><p># bittorrent-console http://path/to/file.torrent</p></blockquote>
<p>If you want to leave a file downloading while you&#8217;re logged out, use screen. Simply type screen before your preferred command above, ie:</p>
<blockquote><p># screen bittorrent-curses http://path/to/file.torrent</p></blockquote>
<p>To detach from the screen, press &#8220;Ctrl+A&#8221;, then &#8220;D&#8221;, and you will be returned to the shell. To re-attach to the screen, run &#8220;screen -r&#8221;</p>
<p>Bittorrent downloads will be stored in &#8220;~/Bittorrent Downloads&#8221; when they are complete. While they are being downloaded, they will be in &#8220;~/.bittorrent/incomplete/&#8221;</p>
<p>Packages for different distributions can be found <a href="http://download.bittorrent.com/dl/">here</a>, along with source code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monkeedev.co.uk/blog/2007/07/12/command-line-bittorrent-in-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Nice shell colours in bash</title>
		<link>http://www.monkeedev.co.uk/blog/2007/07/11/nice-shell-colours-in-bash/</link>
		<comments>http://www.monkeedev.co.uk/blog/2007/07/11/nice-shell-colours-in-bash/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 20:52:53 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.monkeedev.co.uk/blog/2007/07/11/nice-shell-colours-in-bash/</guid>
		<description><![CDATA[Lets face it, the default debian bash prompt is pretty dull whereas distributions like Gentoo have nice colours.
This is very easy to get in all distributions, and it&#8217;s one of the first things I do on new installs.
The file you need to edit is ~/.bashrc, and if you want it to apply to all new [...]]]></description>
			<content:encoded><![CDATA[<p>Lets face it, the default debian bash prompt is pretty dull whereas distributions like Gentoo have nice colours.</p>
<p>This is very easy to get in all distributions, and it&#8217;s one of the first things I do on new installs.</p>
<p>The file you need to edit is ~/.bashrc, and if you want it to apply to all new users, /etc/skel/.bashrc.</p>
<p>Simply add the following lines to the bottom of the file:</p>
<p>//////</p>
<p>eval `dircolors -b`<br />
alias ls=&#8217;ls &#8211;color=auto&#8217;</p>
<p>if [ "`id -u`" -eq 0 ]; then<br />
PS1=&#8217;\[\033[01;31m\]\h \[\033[01;34m\]\w \$ \[\033[00m\]&#8216;<br />
else<br />
PS1=&#8217;\[\033[01;32m\]\u@\h \[\033[01;34m\]\w \$ \[\033[00m\]&#8216;<br />
fi</p>
<p>//////</p>
<p>This will give you a light green prompt for standard users, and red for root. To use different colours, change the numbers in the [01;32m] sections. You will need to logout and login again to see the changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monkeedev.co.uk/blog/2007/07/11/nice-shell-colours-in-bash/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Kernel compiling, the debian way</title>
		<link>http://www.monkeedev.co.uk/blog/2007/07/11/kernel-compiling-the-debian-way/</link>
		<comments>http://www.monkeedev.co.uk/blog/2007/07/11/kernel-compiling-the-debian-way/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 20:37:20 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://www.monkeedev.co.uk/blog/2007/07/11/kernel-compiling-the-debian-way/</guid>
		<description><![CDATA[There are plenty of guides for doing this, but here&#8217;s my way, which I&#8217;ve done on loads of different hardware.
Personally, I prefer to use the stock debian kernel because it supports most hardware and makes upgrading through apt easier. Occasionally though, I like to test the newest kernel releases, and here&#8217;s how I do it.
1, [...]]]></description>
			<content:encoded><![CDATA[<p>There are plenty of guides for doing this, but here&#8217;s my way, which I&#8217;ve done on loads of different hardware.</p>
<p>Personally, I prefer to use the stock debian kernel because it supports most hardware and makes upgrading through apt easier. Occasionally though, I like to test the newest kernel releases, and here&#8217;s how I do it.</p>
<p>1, Install necessary tools:</p>
<blockquote><p># apt-get install kernel-package ncurses-dev bzip2 module-init-tools initrd-tools procps fakeroot</p></blockquote>
<p>2, Download the latest kernel source:</p>
<blockquote><p># cd /usr/src<br />
# wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.1.tar.bz2<br />
# tar -xjvf linux-2.6.22.1.tar.bz2<br />
# cd linux-2.6.22.1</p></blockquote>
<p>3, Unzip any extra patches and apply them:</p>
<blockquote><p># bzip2 -dc patch-xxx.bz2 | patch -p1</p></blockquote>
<p>5, Configure the kernel.</p>
<p>a, Using the current config as a base:</p>
<blockquote><p># cp /boot/config-x.x.x /usr/src/linux-2.6.22.1/.config<br />
# make oldconfig<br />
[ answer all the questions]</p></blockquote>
<p>b, Using the menu interface (you can do the cp line above to use the old config as a base but make changes):</p>
<blockquote><p># make menuconfig</p></blockquote>
<p>If you have multiple processors/cores, you can speed up the compile by utilising them all (this is similar to the -j flag when compiling the non debian way). To find out the number of cores you have, run:</p>
<blockquote><p># grep -c &#8216;^processor&#8217; /proc/cpuinfo</p></blockquote>
<p>Then to make sure all cores are used:</p>
<blockquote><p># export CONCURRENCY_LEVEL=4<br />
replace 4 with the number of processors.</p></blockquote>
<p>6, Compile and install:</p>
<blockquote><p># make-kpkg clean<br />
# time fakeroot make-kpkg &#8211;initrd &#8211;revision=1 &#8211;append-to-version=.kris kernel-image</p></blockquote>
<p>This will usually take between 5 minutes and over an hour, depending on how many modules there are to compile, and how fast your hardware is.</p>
<p>Once this has finished, you will be left with a .deb file which you can install using dpkg:</p>
<blockquote><p># dpkg -i linux-image*.deb</p></blockquote>
<p>Because of the &#8211;initrd flag earlier, the initrd image will be created when you install the kernel. This command will also update grub, so all you need to do to use your new kernel is reboot.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monkeedev.co.uk/blog/2007/07/11/kernel-compiling-the-debian-way/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Setting up a DNS server quickly</title>
		<link>http://www.monkeedev.co.uk/blog/2007/06/22/setting-up-a-dns-server-quickly/</link>
		<comments>http://www.monkeedev.co.uk/blog/2007/06/22/setting-up-a-dns-server-quickly/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 08:09:31 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://www.monkeedev.co.uk/blog/2007/06/22/setting-up-a-dns-server-quickly/</guid>
		<description><![CDATA[Using the following steps, it&#8217;s possible to set up a chrooted debian DNS master server in under 5 minutes. It&#8217;s assumed that you have an understanding of BIND and zone files.
Parts of this guide (the chroot mainly) are taken from a longer guide at howtoforge.
Lines in italic are to be entered into the shell.
apt-get update
apt-get [...]]]></description>
			<content:encoded><![CDATA[<p>Using the following steps, it&#8217;s possible to set up a chrooted debian DNS master server in under 5 minutes. It&#8217;s assumed that you have an understanding of BIND and zone files.</p>
<p>Parts of this guide (the chroot mainly) are taken from a longer guide at <a href="http://howtoforge.com/debian_bind9_master_slave_system">howtoforge.</a></p>
<p>Lines in italic are to be entered into the shell.</p>
<p><font style="font-style: italic">apt-get update<br />
</font><font style="font-style: italic">apt-get install bind9<br />
</font><font style="font-style: italic">/etc/init.d/bind9 stop<br />
</font><font style="font-style: italic">vim /etc/default/bind9</font></p>
<p>Change:<br />
OPTIONS=&#8221;-u bind&#8221;<br />
To:<br />
OPTIONS=&#8221;-u bind -t /var/lib/named&#8221;</p>
<p><font style="font-style: italic">vim /etc/bind/named.conf.options</font></p>
<p>Change the ‘forwarders’ line to the DNS of your ISP<br />
forwarders { x.x.x.x; };</p>
<p><font style="font-style: italic">mkdir -p /var/lib/named/etc<br />
</font><font style="font-style: italic">mkdir /var/lib/named/dev<br />
</font><font style="font-style: italic">mkdir -p /var/lib/named/var/cache/bind<br />
</font><font style="font-style: italic">mkdir -p /var/lib/named/var/run/bind/run<br />
</font><font style="font-style: italic">mv /etc/bind /var/lib/named/etc</font><br />
<font style="font-style: italic">ln -s /var/lib/named/etc/bind /etc/bind</font><br />
<font style="font-style: italic">mknod /var/lib/named/dev/null c 1 3</font><br />
<font style="font-style: italic">mknod /var/lib/named/dev/random c 1 8</font><br />
<font style="font-style: italic">chmod 666 /var/lib/named/dev/*</font><br />
<font style="font-style: italic">chown -R bind:bind /var/lib/named/var/*</font><br />
<font style="font-style: italic">chown -R bind:bind /var/lib/named/etc/bind</font><br />
<font style="font-style: italic">vim /etc/init.d/syslogd</font></p>
<p>Change:<br />
SYSLOGD=&#8221;"<br />
To:<br />
SYSLOGD=&#8221;-a /var/lib/named/dev/log&#8221;</p>
<p><font style="font-style: italic">echo &#8220;nameserver 127.0.0.1 &gt; /etc/resolv.conf</font></p>
<p><font style="font-style: italic">/etc/init.d/sysklogd restart</font><br />
<font style="font-style: italic">/etc/init.d/bind9 start</font></p>
<p><font style="font-style: italic">ping www.google.com</font></p>
<p><font>If that works, then you&#8217;ve got a running BIND master server!</font><font style="font-style: italic"><br />
</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.monkeedev.co.uk/blog/2007/06/22/setting-up-a-dns-server-quickly/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Setting up a hamachi VPN</title>
		<link>http://www.monkeedev.co.uk/blog/2007/06/22/setting-up-a-hamachi-vpn/</link>
		<comments>http://www.monkeedev.co.uk/blog/2007/06/22/setting-up-a-hamachi-vpn/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 08:07:03 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.monkeedev.co.uk/blog/2007/06/22/setting-up-a-hamachi-vpn/</guid>
		<description><![CDATA[I&#8217;ve had a pretty stable VPN setup on my networks for some time now, and I thought others might like a guide on how to get everything working. I had trouble following the threads explaining the concepts, so I spent some time getting it all working myself.
This can all be done using the free hamachi [...]]]></description>
			<content:encoded><![CDATA[<p><font class="postbody">I&#8217;ve had a pretty stable VPN setup on my networks for some time now, and I thought others might like a guide on how to get everything working. I had trouble following the threads explaining the concepts, so I spent some time getting it all working myself.</font></p>
<p><font class="postbody">This can all be done using the free hamachi version. I have a premium license so I can make the network more secure by having to authorise new members.</font></p>
<p><font class="postbody">This guide covers connecting a windows XP machine to private networks with linux and windows machines acting as the routing nodes.</font></p>
<p><font class="postbody">I have 2 networks in my office, 10.1.0.0 and 10.2.0.0. I use the VPN for connecting my laptop to these networks from home.</font></p>
<p><font class="postbody"><font style="font-weight: bold">Setting up the &#8216;client&#8217; XP machine (the one which needs to VPN into the networks)</font><br />
- Download and install hamachi<br />
- Create a new network specifically for the VPN.<br />
- Add &#8216;RoutedTunneling 1&#8242; to hamachi-override.ini and restart Hamachi. You may need to create this file by clicking Configure, Preferences, System, Open Configuration Folder - then create hamachi-override.ini<br />
- Click Start, Run and type &#8216;regedit&#8217;, then set HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\IPEnableRouter to 1<br />
- Reboot and open hamachi.</font></p>
<p><font class="postbody"><font style="font-weight: bold">First &#8217;server&#8217; - Windows (10.1.0.53 is the example local IP)</font><br />
Follow the instructions above, but instead of creating a new network, join the one you previously created. That&#8217;s all you need to do to get a windows server set up.</font></p>
<p><font class="postbody"><font style="font-weight: bold">Linux &#8217;servers&#8217; (10.2.0.201 on my local network)</font><br />
- cd /opt<br />
- wget <a href="http://files.hamachi.cc/linux/hamachi-0.9.9.9-20-lnx.tar.gz" target="_blank">http://files.hamachi.cc/linux/hamachi-0.9.9.9-20-lnx.tar.gz</a><br />
- tar -zxvf hamachi-0.9.9.9-20-lnx.tar.gz<br />
- cd hamachi-0.9.9.9-20-lnx/<br />
- mkdir /dev/net<br />
- make install<br />
- tuncfg/tuncfg<br />
- hamachi-init<br />
- hamachi start<br />
- hamachi set-nick servername<br />
- hamachi login<br />
- hamachi join networkname networkpassword<br />
- hamachi go-online networkname<br />
- echo 1 &gt; /proc/sys/net/ipv4/ip_forward</font></p>
<p><font class="postbody">Note that whenever the linux machines are rebooted, /proc/sys/net/ipv4/ip_forward will reset to 0.</font></p>
<p><font class="postbody">The server nodes are now setup to forward IPv4 packets around the network.</font></p>
<p><font class="postbody">This next step is where most problems will occur. The server nodes will forward packets to the network, but other machines on the local networks don&#8217;t know where to send data to 5.x.x.x addresses. I set up rules on our firewall which work something like:<br />
Requests to 5.0.0.0/8 need to be routed to 10.1.0.53 on the 10.1 network<br />
Requests to 5.0.0.0/8 need to be routed to 10.2.0.201 on the 10.2 network<br />
This is one rule for each of the networks I need to access. I&#8217;m not sure how to do this in different firewall setups so I&#8217;m not much help here.</font></p>
<p><font class="postbody">Everything is now setup, but the &#8216;client&#8217; node doesnt know where to send packets to any of the 10.1 or 10.2 networks. To fix this, we need to create routes on the machine. I created 2 batch files, one to connect the VPN, and one to disconnect.</font></p>
<p><font class="postbody"><font style="font-weight: bold">Connect batch file</font></font></p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><font class="genmed"><strong><br />
</strong></font></td>
</tr>
<tr>
<td class="code">@title Connecting Hamachi VPN Tunnels<br />
@echo Connecting Hamachi VPN Tunnels<br />
@echo -connecting to 10.1.0.0 network&#8230;<br />
@route add 10.1.0.0 mask 255.255.255.0 [HAMACHI ADDRESS OF MACHINE ON 10.1]<br />
@echo -connecting to 10.2.0.0 network&#8230;<br />
@route add 10.2.0.0 mask 255.255.255.0 [HAMACHI ADDRESS OF MACHINE ON 10.2]<br />
@echo .<br />
@echo VPN Connected.<br />
@echo To disconnect, run the disable batch file or reboot the system.<br />
@echo .<br />
@pause</td>
</tr>
</table>
<p><font class="postbody"><br />
Obviously you&#8217;ll need to put the hamachi IP&#8217;s of each of the server nodes in this file.</font></p>
<p><font class="postbody"><font style="font-weight: bold">Disconnect batch file</font></font></p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td class="code">@title Disable Hamachi VPN Tunnels<br />
@echo Disconnecting Hamachi VPN Tunnels<br />
@echo -disconnecting 10.1.0.0<br />
@route delete 10.1.0.0<br />
@echo -disconnecting 10.2.0.0<br />
@route delete 10.2.0.0<br />
@echo .<br />
@echo VPN Disconnected<br />
@echo .<br />
@pause</td>
</tr>
</table>
<p><font class="postbody">At this point everything is set up and ready to connect. You will need full connectivity to all the server nodes which you are using (green icons in hamachi).</font></p>
<p><font class="postbody">Then you run the batch file to connect the VPN (or just type the route commands into a command prompt manually). Test pinging the local address of the server nodes, then other addresses inside the remote network.</font></p>
<p><font class="postbody"><font style="font-weight: bold">Diagnostics</font><br />
First, try pinging the local address of one of the server nodes (10.1.0.53 in my example). If this doesnt work, then my guess is that the route command hasn&#8217;t been done correctly.<br />
Next, try pinging another machine on the local network (10.1.0.50 for example). If this doesnt work, then it&#8217;s likely that the server node isn&#8217;t forwarding the packets correctly, or the responses from the machine you&#8217;re pinging aren&#8217;t being sent back to the server node properly - check the firewall routing and make sure you&#8217;ve set /proc/sys/net/ipv4/ip_forward to 1.</font></p>
<p><font class="postbody">Note that this whole setup will only work if the client node is actually off of the local network at the time you try to connect. By this, I mean that when I am at work, my laptop has the IP 10.1.0.56 and it connects out via 10.1.0.1 - obviously the VPN wont work while I&#8217;m at work because the route command will override the default gateway route and stop me connecting out at all. </font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.monkeedev.co.uk/blog/2007/06/22/setting-up-a-hamachi-vpn/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SCP between servers without passwords</title>
		<link>http://www.monkeedev.co.uk/blog/2007/06/22/scp-between-servers-without-passwords/</link>
		<comments>http://www.monkeedev.co.uk/blog/2007/06/22/scp-between-servers-without-passwords/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 08:04:47 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.monkeedev.co.uk/blog/2007/06/22/scp-between-servers-without-passwords/</guid>
		<description><![CDATA[This is something I always forget how to do, so I&#8217;ll post it here.
When copying or connecting between Linux servers, the most straightforward solution is to use SSH or SCP. The only problem is that you&#8217;ll need to enter the password for the remote machine every time you connect, making this not very useful for [...]]]></description>
			<content:encoded><![CDATA[<p>This is something I always forget how to do, so I&#8217;ll post it here.</p>
<p>When copying or connecting between Linux servers, the most straightforward solution is to use SSH or SCP. The only problem is that you&#8217;ll need to enter the password for the remote machine every time you connect, making this not very useful for scheduled scripts such as backups.</p>
<p>The easiest way to do this is to use public/private keys. To create a key on the local machine, do the following:</p>
<p><font style="font-style: italic">ssh-keygen -t rsa</font></p>
<p>Then just press enter at all of the prompts. This will create a keyfile called ~/.ssh/id_rsa.pub which you will need to copy to the remote machine.</p>
<p><font style="font-style: italic">ssh user@host &#8220;cat &gt;&gt; .ssh/authorized_keys&#8221; &lt; ~/.ssh/id_rsa.pub</font></p>
<p>If the file ~/.ssh/authorized_keys doesn&#8217;t exist, you&#8217;ll need to create it, and ensure that it&#8217;s permissions are correct:</p>
<p><font style="font-style: italic">-rw-r&#8211;r&#8211; 1 root root 1412 2007-04-25 08:36 authorized_keys</font></p>
<p>Once this is done, you should be able to SSH and SCP to the remote machine without a password.</p>
<p>Obviously, from a security point of view this is a bad idea (especially if you&#8217;re doing it as root), but there are a lot of occasions where it can be useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.monkeedev.co.uk/blog/2007/06/22/scp-between-servers-without-passwords/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
