Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 180
  • Last Modified:

Hosts File


Is it possible to have this in a hosts file...         notes.mail.com     notes.mail.com

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

1 Solution
Lee W, MVPTechnology and Business Process AdvisorCommented:
No, it will read the first entry as the IP.  
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...
I suggest u to put         notes1.mail.com     notes.mail.com

hope this is better what do u say...
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.
what you can do is write a 2 batfiles, place them on the desktop :

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

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
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


Featured Post

Who's Defending Your Organization from Threats?

Protecting against advanced threats requires an IT dream team – a well-oiled machine of people and solutions working together to defend your organization. Download our resource kit today to learn more about the tools you need to build you IT Dream Team!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now