I’ve added zfComicEngine to launchpad. It should be easy now to add new translations. Here’s the link: https://launchpad.net/zfcomicengine.
Archive for the ‘Projects’ category
zfComicEngine now at Launchpad
October 24th, 2009Building OpenVPN for gaming
October 13th, 2009This is OpenVPN setup for gaming where VPN’s own internal network is not connected to physical LAN. It’s star shaped and OpenVPN server is running on high bandwidth connection on virtual machine or dedicated server in some ISP’s server room so that the latency is minimal to all connected gamers (ie. guy which has most upload bandwidth should do this). Every player and game server hoster connects to this server and OpenVPN handles rest of networking stuff. It’s also layer 2 (TAP) so that everyone sees mac addresses and UDP broadcasts work ok etc.
Install OpenVPN
aptitude install openvpn
Setting up OpenVPN server
/etc/openvpn/server.conf:
mode server tls-server port 1194 proto udp dev tap client-to-client ca /etc/openvpn/easy-rsa/keys/ca.crt cert /etc/openvpn/easy-rsa/keys/servername.crt key /etc/openvpn/easy-rsa/keys/servername.key dh /etc/openvpn/easy-rsa/keys/dh384.pem ifconfig-pool-persist ipp.txt server-bridge 10.10.10.1 255.255.255.0 10.10.10.128 10.10.10.250 push .route 10.10.10.1 255.255.255.0 keepalive 5 60 comp-lzo persist-key persist-tun status /var/log/openvpn-status.log log-append /var/log/openvpn.log verb 3 user nobody group nogroup #this allows more than one connection at a time from same key #good if you just want to give one "gaming" certificate to everybody #duplicate-cn
mkdir /etc/openvpn/easy-rsa cp /usr/share/doc/openvpn/examples/easy-rsa/2.0/* /etc/openvpn/easy-rsa cd /etc/openvpn/easy-rsa
Modify “vars” file with your favorite editor
Change export KEY_SIZE=1024 to export KEY_SIZE=384. We don’t need much encryption for gaming.
Modify export KEY_COUNTRY, KEY_PROVINCE, KEY_CITY, KEY_ORG and KEY_EMAIL to your liking.
Save the file.
source ./vars ./clean-all ./build-ca ./build-key-server servername ./build-dh
Use
/etc/init.d/openvpn restart /etc/init.d/openvpn start /etc/init.d/openvpn stop
To start/stop/restart the OpenVPN server.
Adding clients
Replace clientX with actual username wanted.
cd /etc/openvpn/easy-rsa source ./vars ./build-key-pkcs12 clientX
copy clientX.p12 file from “keys” directory to some directory
create following clientX.ovpn file:
client dev tap proto udp #replace this with your OpenVPN server hostname/IP remote 192.168.0.123 1194 resolv-retry infinite nobind ns-cert-type server comp-lzo verb 3 pull # Replace this with your own .p12 certificate file pkcs12 clientX.p12
Send the certificate (.p12) and .ovpn file to your buddy.
Windows client configurations / troubleshooting
We used OpenVPN GUI as Windows client. Download the .ovpn and .p12 file to C:\Program Files\OpenVPN\config directory. Click connect on OpenVPN GUI’s taskbar icon and you should be connected.
To minimize problems set the OpenVPN TAP Adapter as first interface from network configuration. This required reboot for me so that Windows XP acknowledged it. Remove unnecessary stuff from TAP interface (like QoS).
WireShark is your friend. Use it to find out if games are shouting their packets to wrong network and not to VPN IP network. 99.9% of LAN games use UDP broadcast to tell about themselves so use “udp” as filter.
Ping and arp -a is also good for basic connectivity testing. Some firewalls block ping (ICMP) so be aware of that too. Other good tool is netstat and TCPView for looking in which port the game is running.
If you’re running some old games through virtual machine then set the virtual machine’s network adapter to OpenVPN’s TAP Adapter. IPX packets should go through too because TAP is layer 2 (but I didn’t test).
I also found this ForceBindIP application which will force specified application to certain network card or network card IP. Might come in handy if game is constantly picking up wrong NIC or IP network.
Sources
Gozerbot and What is this file?
October 2nd, 2009It’s been many years since I played with IRC bots. I’ve used eggdrop for something like 10+ years. Now I tried Gozerbot and coded plugin (source) to it which gets URLs from chat and then gives some information about them. It utilizes my other project – “what is this file?” which runs on top of Google App Engine. Everything is using Python.
First site using zfComicEngine!
September 26th, 2009Finnish Pikselinviilaajat IT comic is now using zfComicEngine. It was previously running on my non-opensource and age old code. I coded simple converter which corrected all the old links in HTML etc with PHP’s DOM and XML Starlet.
ZFCE has many similarities to old Pikselinviilaajat comic publishing engine but of course it’s all been rewritten.
If you want to try out zfCE, please use my demo site. I’m also looking for some people with some graphical eye so that zfCE could have more default CSS files for new users.
I’m also planning for Flash support so that you could publish animations easily too.
New translations are also welcome. Currently supported languages are Finnish and English.
Virtualizing retro BBS software
September 22nd, 2009So what would you need to run BBS today? No, I don’t mean those crappy forumsĀ that float in every corner of internet.
Generating ISO image for VMWare
I aqcuired old DOS boot floppy image from the internets. It was in IMG format so my VMWare wouldn’t like it. What to do? Who has floppy drives or disks any more? You guessed it: Use virtual floppy drive of course!
Ok, let’s create that ISO 9660 image. Open up CDBurnerXP and go to Disc -> Boot options and load up the IMG file. Now Burning software will scrape it for necessary boot stuff. Browse to that virtual floppy drive and throw all files to disc. Next thing is to “burn” it as ISO image. Easy.
Installing operating system
I’m using VMWare Server for this. Create new virtual machine and select Windows 98. I used 64 MB of memory, 1 GB of disk space and no networking. Use the generarated ISO image as virtual CD/DVD drive. Don’t add virtual COM ports just yet, let’s test this thing first.
Aargh! MS-DOS is horrible! Where’s scrollable screen or auto completion for commands? But show must go on. Run FDISK to create partition C:. After you’ve created the partition, reboot (CTRL-ALT-Insert). Go to BIOS (F2) and set CD-ROM drive as first bootable device. Next thing is to format C:. Run FORMAT C: /Q. Next thing is to copy OS to C:. Run COPY *.* C:. Go to C: drive and write the Master Boot Record with command FDISK /MBR. Go back to A: drive and run SYS C: which restores system. Next go to virtual RAM drive and copy some necessary software like EDIT with COPY *.* C:. It was in my case drive D:. Reboot. Change first bootable device to hard drive from BIOS. Now you’re running DOS from C:. Easy isn’t it?
Install PCBoard
First, you need to download PCBoard. Unzip the file. Open up the generated ISO image and add all unpacked files to some subdirectory (I used PCBOR11). Also, if you don’t have XCOPY.EXE anywhere in your ISO image, get it. Save the ISO file again. Reboot from CD.
Go to CD drive. In my case it was E:. Run XCOPY /S pcbor11 c:. Go to C: drive. go to install directory and run install.
*insert hours after hours of frustration here*
Installing Windows 98
This should be pretty basic stuff.
Installing virtual modem
Install virtual modem to your actual OS. I found and used Virtual Modem Pro. I created Virtual COM1 port with it and then used the “Use physical serial port” from VMWare configuration for my guest OS.
Installing BBBS
Fetch BBBS from it’s site.
Configure BBBS by running bcfg4
Start node 1 by running BBBS 1
BBBS should be now in “Waiting for calls” state. Or if not, install “Standard 56k modem” to W98 and try again.
But that’s not enough
You can’t run that virtual modem over VoIP. VoIP is designed for human voice. Modem’s noise is garbled and connection cannot be made. There’s hope though, ITU V.150.1 AKA V.MoIP (Modem over IP) is coming. Some hardware boxes seems to support it already. So let’s try someday again when MoIP support is available.
Setup in the end
Windows XP is running virtual modem and VMWare. VMWare is running Windows 98 and it’s running BBBS which is connected to virtual COM1 port via VMWare’s “physical” COM1 which is connected to that virtual modem.