Hosts File

Hi,

Is it possible to have this in a hosts file...

172.16.1.3         notes.mail.com
67.20.25.120     notes.mail.com

I want to do this so that an employee with a laptop can access our mail server internally from the ip 172.16.1.3, but if they try to connect externally, they use 67.20.25.120.  Is this possible?

Ryan
LVL 1
NeoTekAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee W, MVPTechnology and Business Process AdvisorCommented:
No, it will read the first entry as the IP.  
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kain21Commented:
no... if you're using dhcp to assign the laptop an address you could put the host record in your internal dns and have dhcp assign the internal dns server to the laptop...
0
thribhuCommented:
I suggest u to put

172.16.1.3         notes1.mail.com
67.20.25.120     notes.mail.com

hope this is better what do u say...
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

mikeleebrlaCommented:
actually you should just set up your DNS properly that way ANY of your users can get to their mail from inside or outside your lan.   If they are on your lan they should point to your internal dns server and get the internal IP.... if they are outside your lan they should point to any public DNS server and get the public IP.  This is called split DNS.
0
elconomenoCommented:
what you can do is write a 2 batfiles, place them on the desktop :



home.bat
copy C:\homehost.txt C:\WINNT\system32\drivers\etc\HOSTS


WORK.bat
copy C:\workhost.txt C:\WINNT\system32\drivers\etc\HOSTS



i added also some netsh commands to change DNS changes in the WORK.bat to
0
ezSoftwareCommented:
I use a great piece of software that does many things beyond assigning seperate host files for different locales - mapped network drives, printers, IP address/DHCP, domain, management of multiple communication devices such as wireless or wired, vpn, etc.

I need this software because I connect my laptop to approximately 20 different networks - as many as 4 in one day.

It's the best piece of software I've purchased for my laptop and it wasn't tough on the wallet...

http://www.globesoft.com/      - Multi-Network Manager 7
http://www.globesoft.com/cgi-bin/prices.asp?ShortDesc=mnm7     - pricing


0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.