“Address already in use” error when OpenVPN is NOT running

So for the past week or so I’ve been trying to set up a dual-stack-payload OpenVPN server.  I was playing around with some IPv6 route settings earlier when it started doing this:

$ sudo openvpn /etc/openvpn/server.conf
Wed Aug 31 02:41:06 2011 Herp derp, herpity derp derp...
Wed Aug 31 02:41:06 2011 TCP/UDP: Socket bind failed on local
address [AF_INET]64.71.167.212:1194: Address already in use
Wed Aug 31 02:41:06 2011 Exiting due to fatal error

$ echo "OH FUCK WHY WONT IT WORK!!!!1!1one!!1!"
OH FUCK WHY WONT IT WORK!!!!1!1one!!1!
$ cat /etc/openvpn/up.sh
#!/bin/sh

sysctl -w net.ipv4.ip_forward=1
sysctl -w net.ipv6.conf.all.forwarding=1

ip link set $dev up promisc on mtu $tun_mtu

brctl addif br0 $dev

iptables -t nat -A POSTROUTING -s 10.4.4.0/24 -o eth0 -j MASQUERADE

service radvd restart

true
$ sudo lsof -i ":openvpn"
COMMAND  PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
radvd   2486  root    6u  IPv4  12816      0t0  TCP srwz.us:openvpn (LISTEN)
radvd   2487 radvd    6u  IPv4  12816      0t0  TCP srwz.us:openvpn (LISTEN)

WHAT??? radvd is listening on OpenVPN’s port?

Some background:  I was restarting radvd in the up script because it’s set to advertise on tap0, but tap0 doesn’t exist when the system boots, so instead of messing with the init scripts, I decided to just restart radvd in the up script.  However, since the up script is executed as a subprocess of OpenVPN, it apparently inherits OpenVPN’s sockets, and radvd in turn inherits the shell script’s sockets, causing problems when you restart OpenVPN (even with SIGHUP, I would assume). *

Now I do have IgnoreIfMissing on; in my radvd.conf file (it’s not the default yet in the radvd 1.7 that ships with natty), but I didn’t realize that starting radvd succeeded when tap0 didn’t exist, which is why I was doing it in the up file.  radvd rereads its config file on SIGHUP, so to fix the issue, I simply changed this line in the up script:

service radvd restart

to:

kill -HUP `cat /var/run/radvd/radvd.pid`

and restarting OpenVPN worked again.

Time to go to bed now.  I hope this helps someone.

* Disclaimer:  I don’t have 200 years of UNIX experience like some people do, so I may be a little bit wrong about this.  But I’m probably right.  :)

Posted in Uncategorized | Tagged | Leave a comment

OpenVPN 2.2.1 + IPv6 Payload Patch for CyanogenMod 7.1 RC1

I’ve ported Gert Döring’s IPv6 payload patch for OpenVPN to CyanogenMod.  I want to try to get it into the CM source tree someday, but here are the goods in the meantime.

Enjoy!  I will not provide support for any of this, so use it at your own risk and don’t come crying to me if it hacks your Facebook and changes your relationship status or something.  I really can’t help you with that:P

Posted in Uncategorized | Leave a comment

Google+ Tango Icon

I’ve made a Tango-style Google+ icon.

For more information and SVG downloads, see my Tango Icons page.

Posted in Uncategorized | Leave a comment

AppBackup 2.0.2 released!

AppBackup 2.0.2 is out and fixes the following issues:

  • Fixed a bug with translations where if something wasn’t translated then nothing would appear in the UI (expected behavior is that the English text would appear instead).
  • AppBackup no longer crashes if backuptimes.plist is corrupted or malformed.

Also, the Czech, Japanese, and Korean translations have been updated.  The new version should be on Cydia soon.

Posted in Uncategorized | Leave a comment

AppBackup 2.0.1 released

AppBackup 2.0.1 has been released and should be on Cydia soon.  It fixes the bug where the app was hanging on the Please Wait screen.

Changes:

  • Fixed the problem where AppBackup was hanging on the Please Wait screen for many people.
  • Fixed a cosmetic bug with the Please Wait screen.
  • Updated Spanish translation.
  • ini-to-strings.py now sorts the list of language files before converting them.
Posted in Uncategorized | Tagged | Leave a comment

AppBackup 2.0 is finally finished!

After a long wait, the new version of AppBackup, AppBackup 2.0, is finished and has been submitted to BigBoss.  It will show up on Cydia within a day.  Here is what has changed in 2.0:

  • AppBackup now works on iOS versions 4.3.x and later (and it still works with iOS 3; untested on iOS 2).
  • Added a confirmation screen for all actions.
  • Redesigned About screen.
  • AppBackup has been split into two parts:
    • The GUI, written in Objective-C this time.
    • A command-line interface in the form of a Python package. (Just type appbackup at the terminal to use it.)
    • As a result, the code has been completely rewritten and is much cleaner and object-oriented.
  • The FixPermissions utility can now be used by typing appbackup-fix-permissions at the terminal. It is still run automatically in the GUI mode only.
  • Updated translations and added new translations for the following languages:
    • Czech – Jan Kozánek
    • Chinese – goodlook8666
    • Greek – Spiros Chistoforos-Libanis
    • Japanese – Osamu
    • Korean – Joon Ki Hong
    • Norwegian – Jan Gerhard Schøpp
  • Changed translations format in the source tree.
  • Translations are now managed on Transifex (https://www.transifex.net/) and converted to Apple’s Localizable.strings format at build time.

I would like to thank everyone who has been patient while I was working on fixing AppBackup, and I am very sorry it took so long.

<ul>
<li>AppBackup now works on iOS versions 4.3.x and later (and it still works with iOS 3; untested on iOS 2).</li>
<li>Added a confirmation screen for all actions.</li>
<li>Redesigned About screen.</li>
<li>AppBackup has been split into two parts:
<ul>
<li>The GUI, written in Objective-C this time.</li>
<li>A command-line interface in the form of a Python package.  (Just type appbackup at the terminal to use it.)</li>
<li>As a result, the code has been completely rewritten and is much cleaner and object-oriented.</li>
</ul>
</li>
<li>The FixPermissions utility can now be used by typing appbackup-fix-permissions at the terminal.  It is still run automatically in the GUI mode only.</li>
<li>Updated translations and added new translations for the following languages:
<ul>
<li>Czech – Jan Kozánek</li>
<li>Chinese – goodlook8666</li>
<li>Greek – Spiros Chistoforos-Libanis</li>
<li>Japanese – Osamu</li>
<li>Korean – Joon Ki Hong</li>
<li>Norwegian – Jan Gerhard Schøpp</li>
</ul>
</li>
<li>Changed translations format in the source tree.</li>
<li>Translations are now managed on <a href=”https://www.transifex.net/”>Transifex (https://www.transifex.net/)</a> and converted to Apple’s Localizable.strings format at build time.</li>
</ul>
Posted in Uncategorized | Tagged | 1 Comment

AppBackup 1.0.14 is released

I have released AppBackup 1.0.14.  This is a SECURITY UPDATE.  You should update AS SOON AS POSSIBLE in order to keep your device secure.

AppBackup still does not work on iOS 4.3.x; however you should still update for security reasons. I am in the process of rewriting AppBackup so that it will work on iOS 4.3.x, and I am very sorry for the long wait.

Download or wait for it to show up on BigBoss.

Posted in Uncategorized | Tagged | Leave a comment

Eric Whitacre’s Virtual Choir 2.0 Premiere is tomorrow!

Eric Whitacre’s Virtual Choir 2.0 (which I happen to be in) premieres tomorrow at 5 PM central time. You can watch the premiere event live at WQXR.org or wait for it the Virtual Choir video to hit YouTube.

Update (2011-04-08):  The YouTube video is up!  http://www.youtube.com/watch?v=6WhWDCw3Mng

Update 2 (2011-04-11):  You can watch an archived version of the premiere at livestream.com.

Posted in Uncategorized | Leave a comment

Forcing DD-WRT to use the desired DNS server

I should NOT have to add

server=74.82.42.42
no-resolv

to my DNSMasq config in DD-WRT in order for it to use the DNS server I want it to and NOT my ISP’s DNS servers with their lack of IPv6 Google and spamming queries for non-existent domains.  And yes, I did set the DNS server on the main setup page.

Posted in Uncategorized | Tagged , , , | Leave a comment

AppBackup 1.0.13 released

I’ve released version 1.0.13 of AppBackup, which brings the following changes with it:

  • Added the ability to ignore and un-ignore apps in the backup list and when using the All button.
  • Fixed a crash caused by an error in the Dutch translation.  (Tim van Neerbos was consulted about the problem string.  This bug only affected users who have their language set to Dutch.)
  • The unique bundle ID of each app is now displayed under its name in the backup/restore prompt.

Download or wait for it to show up on BigBoss.

Posted in Uncategorized | Tagged | Leave a comment