Category Archives: Misc

30c3 Quick VPN setup

The CongressChecklist mentions that a VPN tunnel is a good idea; in fact it is. Here’s a basic OpenVPN recipe. You need the following tools:

  • A server with enough bandwidth to handle the incoming and outgoing bandwidth (I’ve got a root server with 1Gbit/s connectivity at Hetzer, that should do)
  • OpenVPN

The recipe is fairly simple; I use a preshared secret and NAT so that I don’t need a separate IP.

Note: This setup is only suitable for a single device; it doesn’t do DHCP or other fancy stuff.

Step 1: Generate the shared secret

This generates a key to be used as shared secret. You need the same key on both your server and your client(s). Personally, I’ve placed my key in /etc/openvpn/secrets, but you may use any other path as well (AFAIK).

Step 2: Server Configuration

Additionally, we need a NAT rule which applies to the tunnel network (technically, the netmask is too big; but hey, you can fix that later). eth1 is my output interface.

Step 3: Client Config

Step 4: Testing

Start both tunnels. Check the output of both logs; you should see something like this:

Test that you can ping the server’s internal IP from your client:

Verify that you can ping the interwebz:

Verify that you actually route via the tunnel:

Possible solutions for non-working setups (I’ve not tested them and I am not 100% sure that you need those; they’re just ideas)

  • Check that /proc/sys/net/ipv4/ip_forward on your server is set to 1. On the client, this shouldn’t be necessary.
  • Check that /proc/sys/net/ipv4/conf/all/rp_filter is set to 0 on your server.

Step 5: IPv6 Tunneling

You can tunnel IPv6 over OpenVPN as well, but I have neither setup nor tested this. Technically, you could simply use two static IPv6 addresses and route them via the tunnel; however, this requires additional works with routing tables. You could even setup NAT, but that’s not a good idea either.

A better idea might be to use a tunnel broker or miredo, which should simply use the IPv4 tunnel. If you have comments about how to easily setup IPv6 over the tunnel, feel free to comment!

Updates:

  • The MTU was still too big, 1380 didn’t work (yet?) on the congress network. Using 1300 for now
  • I couldn’t get DNS push to work, probably because clients don’t use DHCP for now – I simply created a script which pushes my own nameserver into /etc/resolv.conf

Zocial Social Buttons

I’m currently working on a super-secret project, for which I use the Symfony framework together with FOSUserBundle and HWIOAuthBundle. Users can simply login using their favourite oAuth-provider. For that purpose, I needed some nice login buttons – and not surprisingly, somebody already did those – in a great way! CSS3, so no graphics needed. 42 different buttons and: Free of charge!

Homepage: http://zocial.smcllns.com/
Demo: http://zocial.smcllns.com/sample.html
Source: https://github.com/samcollins/css-social-buttons

Zocial Social Buttons

 

My personal top 5 of Videogame Music

This top ten list has the following rules:

  1. Each game music has to be created on a console using the internal sound chip – recorded music via high-quality DACs, as modern game consoles have, don’t count. The limit I’ve set is to the SNES/Genesis generation.
  2. Only original music – no modern remixes allowed.
  3. PCM samples are allowed.
  4. The game must have good music throughout the whole game
  5. I list only one track per game, except for the winner
  6. You will most likely disagree with my choices, that’s why this is my personal top 5.

Rank 5: Secret of Mana (SNES)

This game has pretty ok music, but a highlight was the “Fear of the Heavens” tune.

Rank 4: Mega Man (Gameboy)

I am always amazed how great music the people have written for the Gameboy. Mega Man features very cool music, and it’s really a pleasure.

Rank 3: Starfox (SNES)

I especially love the orchestral hits and guitars in this tune.

Rank 2: Golden Axe – Wilderness (Sega Mega Drive/Genesis Version)

The harsh FM sounds really rock and fit perfectly to the rough gameplay, even if they might be too bright for weak ears. The other tracks are also very good, but the track from the first stage is the best – it really has blown away my mind the first time I’ve played it.

 

Rank 1: Phantasy Star IV (Genesis)

»As soon as I turned on the game, and this awesome music with this awesome song came up, I knew that it was an awesome game«

And I fully agree. The whole game has brilliant music, there are almost no repeating tracks. The music really aids the gameplay, or vice versa – you decide.