OS X actually has (at least) 3 firewalls. Since you've turned off the application firewall (in System Preferences -> Security & Privacy -> Firewall) and checked the Berkeley packet filter (pfctl -sa
), I'm guessing it's the old ipfw that's doing the blocking. You can check with sudo ipfw show
-- that'll list the active rules, along with counts of how many packets and bytes each one has applied to:
$ sudo ipfw show
01000 19228642 23229993542 allow ip from any to any via lo0
01010 0 0 deny ip from any to 127.0.0.0/8
[etc...]
65534 23505 3467352 deny ip from any to any
65535 0 0 allow ip from any to any
If your listing only shows rule #65535 (the allow rule at the end), my guess is wrong and you have to look elsewhere. If it does show other rules, you probably have a third-party firewall config program installed somewhere (I don't think the Apple-supplied ipfw config software is still there in 10.8); take a look in /Library/StartupItems and /Library/LaunchDaemons for things that might be relevant.
Unison is my go-to tool for a bi-directional file sync. (Mac binaries are available on a contributor's site.) I tend to think of it as a more interactive, configurable, and bi-directional version of rsync
. Since it's a good *nix citizen, it can be automated via your favorite method. It's open-source and has ports to major OS platforms.
Unfortunately, Unison is no longer under active development, which may or may not be an issue for you. (I think the last time I used it was under 10.6.) But, it does fit your requirements nicely:
- It handles bi-directional sync and works great on large files and data sets.
- It can run in a completely automated way or interactively (where your review and confirm every change).
- It runs over SSH.
- GUI and CLI interfaces are available. (FWIW, the Mac GUI version, while nice/convenient, was always slightly flaky for me.)
- Its end-user documentation is excellent and thorough.
- It has configuration options for a multitude of use cases.
- It has a design principle of leaving things in a Good State at all times, which makes it easier to recover should the connection be lost at any time.
And here's the main selling point for using it (for me, at least):
For remote SSH targets, it logs into the remote machine, runs a separate copy of Unison there to scan for changes, and then reconciles the state with your local machine to only transmit the bits (or bytes :-)) that differ, much like rsync
does. This makes it very efficient with bandwidth, and it's also able to maintain caches of its file index on each side to make subsequent scans faster. For large data sets, this is a huge deal.
There are other Mac-specific tools for file synchronization, but, IIRC, they tend to assume that the filesystem is local, and are either very inefficient with bandwidth or very presumptuous about file "changes" (metadata, actual data) on large remote files / data sets.
Unison worked the way I needed it to, was reliable, and made me confident in using it due to its great documentation. Thank you, Benjamin C. Pierce!
Best Answer
If you can get to your web server via IP address but not by hostname that means that you do not have DNS configured. DNS is designed to translate between so-called "friendly names" and IP addresses via a DNS server.
You can't edit the /etc/hosts file on iOS without jailbreaking your iPhone.
What you need to do is be able to manually configure your router (assuming you have a common home router provided by your ISP) to point local addresses to specific local host names. Unfortunately most home routers don't let you modify DNS settings, instead they pass DNS through to the ISP's DNS servers or use a public DNS server.
So what you would need to do is set up a DNS server on your local network to point local IP addresses to specific host names and then set up your iPhone to use that DNS server in Settings > WiFi > [your Wifi network] > Configure DNS > Manual.
But honestly that is a lot of trouble, I'd just use the IP address.