How to change DNS server of the Internet Sharing in MAC OS X

About

I had a problem with the Blackberry Z10, because you can't change the DNS of the network, so I need to specify the DNS server in the router, in this case the Internet Sharing of MAC.

You could use any TextEditor, but if you have Xcode installed this procedure is easier.
This procedure works in  MAC OS X 10.8.4:

  1. Start Internet Sharing if it's not already running.
  2. In Terminal, type cp /etc/bootpd.plist /tmp/bootpd.plist
  3. Stop Internet Sharing.
  4. Open /tmp/bootpd.plist for editing using TextEdit or whatever.
  5. Locate this section of the file:

    <key>dhcp_domain_name_server</key>
    <array>
    	<string>192.168.2.1</string>
    </array>
  6. Change the value of string to:

    <string>8.8.4.4</string> 

    or whatever DNS server you want.

  7. Start Internet Sharing.
  8. In Terminal, type sudo cp /tmp/bootpd.plist /etc
  9. If you want to, check that your change to /etc/bootpd.plist hasn't been reverted.

 

You could add a second string for the DNS 2 server.

About the author

Enterprise Web Developer

Julio Mora is an experienced developer who has worked creating mobile applications for the demanding video game industry. He has experience working with international teams and has earned the respect of his team members for his commitment to delivering excellent work products. He continues to focus on building an exceptional user experience. His background includes:

  • Web Technologies: Content Management Systems (IBM WCM), JavaScript libraries (jQuery, Dojo), CSS3, HTML5, mobile web, Operating Systems.
  • Research: Artificial Intelligence, Computer Graphics and Computer Simulation for robotics.
  • Mobile Technologies : IOS Development, Android Development.