Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a fairly simple OpenVPN setup on an OpenVZ VPS with Ubuntu 11.10. Client is the Viscosity client on Mac OS X 10.8.2, and after some testing, we can rule out the client as being part of the problem. Everything has been working fine except for Apple's iCloud stuff. Web surfing, email, FTP, NNTP, and Skype are all working as expected. It's ONLY the iCloud services that cease to function.

If I connect to the VPN, iCloud stuff stops working. I no longer get anything in Messages, Calendar items don't get updated, and Notifications stop working. If I disconnect, the iCloud stuff all starts working. Connect again, iCloud stops working.

Here's the server.conf:

status openvpn-status.log
log /var/log/openvpn.log
verb 4
port 1194
proto udp 
dev tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
dh /etc/openvpn/dh1024.pem
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
push “dhcp-option DNS″
keepalive 10 120
cipher BF-CBC
user nobody
group nogroup
tun-mtu  1500
mssfix 1400

I'm using iptables in a script, and it's also fairly simplistic.

iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -A FORWARD -i tun0 -o venet0 -j ACCEPT
iptables -A FORWARD -i venet0 -o tun0 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 1194 -j ACCEPT
iptables -A INPUT -p udp --dport 1194 -j ACCEPT
iptables -t nat -A POSTROUTING -s -j SNAT --to-source <server's public ip>
echo 1 > /proc/sys/net/ipv4/ip_forward

I tried forwarding ports as well, with no success.

iptables -A FORWARD -p tcp -d --dport 5222:5230 -j ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport 5222:5230 -j DNAT --to-destination

I am also sometimes behind a double-NAT situation that I have no control over.

Client -> work VPN -> my OpenVPN box -> Internet.

Client -> Airport Express -> ISP (which is doing NAT) -> my OpenVPN box -> Internet.

Those two situations are just the fact of life where I am, and I cannot change them. I do have full control over my client and the OpenVPN server.

I am completely out of ideas. I have posted a similar query at the OpenVPN forums, but it hasn't posted yet and seems to be in their moderation queue still. Tried on freenode irc channels, but nobody is awake, so here I am. I have Googled extensively for this, and can find nothing that is related.

Help me get iCloud stuff working again!

(Note: Sort of cross posted. I posted it here because of the Linux crowd that might be able to help with the particulars of iptables)

EDIT: I hate to admit it, but it might possibly be the client after all. The issue does NOT occur with Tunnelblick. I'm opening a dialogue with the developer on this. They've been very helpful so far, so maybe we'll find out what's going on.

share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.