Hi,
A friend on another forum asked this question, I'm pretty sure it can be done with ipfw, but can't figure out the propper command. Any help is appreciated.
The problem is with mail server configurations.
In his workplace, this guy has to configure Mail.app to fetch mail from an internal IP in the company's LAN, say aaa.bbb.ccc.ddd.
When he goes home, he can't reach the internal IP so he uses the server's domain name mail.company.com.
The domain name cannot be accessed from inside the LAN.
Now, my solution would be to use ipfw's 'fwd' rule to create rule 1234 that instructs ipfw to forward all traffic addressed to mail.company.com to the IP aaa.bbb.ccc.ddd. And when the guy goes home he just uses 'sudo ipfw delete 1234'.
Maybe using it alongside the hosts file. Or maybe use the 'divert' command ?
It's not -that- elegant but it's easier than changing Mail.app's configuration each time. (Unless there's some way to change this with OS X's Location manager that I don't know of).
Anyway, my problem is that I can't figure out the proper syntax for this.
Again, any help is appreciated.