How to automount a remote share in Mavericks

You want to use Time Machine over a remote share. It is important to permanently mount it when you login to your Mac.

As an example let’s connect to a Western Digital My Cloud that has the default name WDMyCloud.

How to mount it

After launching the Finder you may see it at the Shared section

Shared WDMyCloud

and just click it and connect with the share you want.

If it’s not visible just select from the Finder’s Menu Go / Connect to Server...

At the Server Address: type


You may change wdmycloud.local with the IP address of your NAS or remote share. Choose the type of connection and then just choose a share. It will show up like this

Shared wdmycloud.local

Auto mounting the share

Select from the top menu Apple / System Preferences... / Users & Groups / Login Items

Click the + button and now select your remote device from the left list under Shared.

WDMyCloud Connect As

Make the connection and select the share you want.

It’s done! Now every time you enter your Mac it will try to mount that share immediately.

A little note…

Apple guys like to be funny. See what would show up if you used smb: instead of cifs:

smb wdmycloud.local Connect As

You may be interested in Using an SMB share from Mac OS X in Linux


Apache2 rewrite rules are not working

You have just edited your .htaccess on the root of your new site with RewriteRules and it’s not working. Something like this for a WordPress installation

RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]

There are two reasons for this to happen. The mod_rewrite is not enabled by default and your configuration may not allow the use of .htaccess

Enabling mod_rewrite

As I usually don’t mess with Apache I often forget it has a command to enable modules. It’s just like this.

sudo a2enmod rewrite

Enabling .htaccess files

Edit your site configuration file under /etc/apache2/sites-available/. At the Directory entry for your site files you need to allow the reading of directives in .htaccess files.

If you were editing the default site

                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all

you would have to use AllowOverride FileInfo or even AllowOverride All. It’s your choice.

Get it to work

Finally you have to restart the Apache server to activate the changes

sudo service apache2 restart

That’s it!


Disabling IPv6 in MacOS X or Linux

You may be experiencing slow internet for certain sites if you have a router that doesn’t work well with IPv6 (Fritz, Hitron) or doesn’t allow you to change its DNS settings. You are having name resolution time outs.

I’m assuming you only want IPv4 :-)

The straightforward solution is just to disable IPv6 on your machine.

How to disable ipv6 in MacOS X

If you have Leopard or Snow Leopard (10.5 or 10.6) click Apple / System Preferences / Network. Choose Ethernet or Airport and then Advanced / TCP/IP. Choose off on Configure IPv6.

For Lion or Mountain Lion (10.7 or 10.8) first open a Terminal. To know the name of the network interface you want to edit type

$ networksetup -listallnetworkservices

And then disable IPv6 like this, for example,

$ networksetup -setv6off Wi-Fi

Want to get back ?

$ networksetup -setv6automatic Wi-Fi

How to disable IPv6 in Linux

Let’s suppose you were using WiFi

$ ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:1e:65:f6:84:f4  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::21e:65ff:fef6:84f4/64 Scope:Link
          RX packets:34340 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29814 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:25657649 (25.6 MB)  TX bytes:7569224 (7.5 MB)

You can see your interface also is using IPv6.

$  sudo sysctl net.ipv6.conf.wlan0.disable_ipv6=1
[sudo] password for biafra: 
net.ipv6.conf.wlan0.disable_ipv6 = 1

$ ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:1e:65:f6:84:f4  
          inet addr:  Bcast:  Mask:
          RX packets:34507 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29977 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:25677902 (25.6 MB)  TX bytes:7597685 (7.5 MB)

You can disable it between reboots on /etc/sysctl.conf with this line:

net.ipv6.conf.wlan0.disable_ipv6 = 1

The network problems continue

Really ? Then maybe it’s not an IPv6 issue! :-)