I have a Time Machine back up setup on a Freenas 9.3 server. It works really slowly via WiFi attached to my broadband router. So, I attached it directly to my iMac via Ethernet instead - a full backup takes less than 2 hours now. Problem is how can other Macs on the network see the Freenas server through the IMac Ethernet connection via WIFI? I know the IP address of the Freenas server but can't figure out how I can Time Machine back up my Macbookair via Wifi?
On the iMac, we must first enable port forwarding by entering the following command in Terminal:
echo "rdr pass inet proto tcp from any to any port 12345 -> 192.168.2.x port 548" | sudo pfctl -ef -
replace 192.168.2.x with whatever your FreeNAS is reporting as its IP address. You will also have to enter your account password when prompted. Now, in the Finder on your laptop, connect to your iMac's IP address (192.168.1.x) by typing
command + k and entering
afp://192.168.1.x:12345/. replace 192.168.1.x with whatever your iMac's IP address is, but keep
:12345 as it's needed to connect to your FreeNAS. You may have to select the correct disk from a list. You should now be able to add it as a Time Machine disk on your laptop.
If possible, it will be easier to connect the Freenas box and iMac to the router; or if all machines are gigabit capable, you could plug both machines to a gigabit switch (cheap and easily available) and then connect the switch to the router. Either way you'll have a fast wired connection to your backup and the router will handle the, ahem, routing.
This way you don't have to leave your iMac on to have the NAS available.