ubuntu
Linux VPN and bridging
by jammie on Feb.01, 2009, under networking, ubuntu
After many weeks of getting fed up with the Microsoft VPN client I decided to give the Linux side of things a spin.
After a bit of searching i came across a page on the ubuntu wiki
which started to point me in the right direction.
For my vpn connection i have had to remove the usepeerdns entry. Leaving that in place stopped the box from being able to see the net.
Now the server could see the vpn network so I started to look into methods of making the network available to my other pcs. This stage was the hardest to find information for and everyones version seemed to be different.
This is what worked for me (i found my information at here and here:
- I added ipt_MASQUERADE to the bottom of my /etc/modules file
- In /etc/ppp/ip-up i added the following:
if [ "${PPP_IPPARAM}" = "myvpn" ]; then
ip r a <vpn ip range>/8 via <vpn ip> dev "${PPP_IFACE}"
iptables -F;iptables -t nat -F;
iptables -t mangle -F
iptables -t nat -A POSTROUTING -o "${PPP_IFACE}" -j MASQUERADE
fi - bring up the connection using pon <yourconnection>. Test that you can ping both the local network, remote network and the internet
- Secure it by adding the following before the fi in step 2
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state --state NEW -i ! ppp0 -j ACCEPT
iptables -P INPUT DROP #only if the first two are successful
iptables -A FORWARD -i"${PPP_IFACE}"-o"${PPP_IFACE}"-j REJECT
- Drop the previous connection using poff and then reconnect. The VPN connection should now be correctly setup and you should be able to ping local, vpn and external machines as before
- Create a route on your pcs that point traffic to your VPN’s ip range through the Linux system and you should now have VPN access
I hope this helps people that are trying to setup a vpn connection and then share it between there local machines. The only thing that i am now missing is dns from the vpn. Its not a major problem at the moment but it would be a nice to have feature. I will post my findings once i have some time to investigate.
Change in HDD and VLC Video Problems
by jammie on Jan.31, 2009, under tv/video, ubuntu
After coming across a 250gb hard disk I had forgotten about I decided to replace the existing noisy 20gb hard drive in my TV server. Rather than doing a fresh install I tried to do a side to side copy of the system… did not go to well.
In the end I did a fresh minimal install of ubuntu 8.10. On my initial boot I came across a grub ‘error 18′. After some investigation i realised the boot partition was bigger than the size supported by the motherboard. Did another install but this time added in a small 300MB boot partition. Now the system boots happily! Happy days!
The next issue is related to groups. I installed vlc-nox and placed my init script back into its home on the new install. I tried to run it but it failed horribly with VLC complaining about unable to open /dev/video0. After trying a few things (i installed the vlc package amongst other things) i decided to check out the permissions of /dev/video0 and that is where the problem was. The device has permissions of 660 with a owner of root:video. So I added my user to the video group. Rebooted and tv server was back to normal!
So reminder to self: Check permissions first. Then anything else!
pvr-350 – From the STB to my screen
by jammie on Jan.18, 2009, under tv/video, ubuntu
At home I have my virgin STB connected up to a old 450mhz server. I then use this machine to forward the picture onto which ever machine I am using at the time. I found that adding the following line to a script that is run at startup (mine runs within my vlc init.d script) solves all the problems i was seeing with the pvr-350:
v4l2-ctl –set-ctrl temporal_filter=0 –set-input=5
Once this line is in place the ghosting issues i was seeing vanished. The set-input of course tells the pvr to use the scart input.
This post is mainly for a reminder in the case i ever rebuild this box. However there is possibly some chance someone might find this useful!
How to fix the firefox backspace annoyance
by jammie on May.28, 2007, under firefox, ubuntu
Thanks to this post here there is a very easy way to stop firefox 2.0 paging up when you hit the backspace key. Returning it to its historic job of going back to the previous page.
To do this simply type “about:config” in the address bar of Firefox and press Enter. `Filter` for ‘browser.backspace_action’ and change its value to 0 (zero).
Simple as!