Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

phrac

macrumors member
Original poster
Feb 7, 2004
30
0
Ok, here is my dilemma. I run a mailserver on one of the boxes on my local network. It is hooked up to my cable modem and I have a static IP address. Now, when I am on my home network, I cannot connect to my external ip address, or domain name (disflux.com). So to check my mail at home i have to edit my /etc/hosts file and have disflux.com point to my mailserver's internal address.

What I am asking is if there is a way to run a script or some such to change my /etc/hosts file depending on what wireless network my powerbook joins? For example, when it joins my home network, it should change /etc/hosts to my internal, and any other network it should change /etc/hosts to my mailserver's external address.

I know I can do this by running a local DNS server, but I don't really know how to set one up. Any help is greatly appreciated.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.