{"id":7357,"date":"2014-11-30T15:36:59","date_gmt":"2014-11-30T14:36:59","guid":{"rendered":"http:\/\/www.wjst.de\/blog\/?p=7357"},"modified":"2014-11-30T18:09:49","modified_gmt":"2014-11-30T17:09:49","slug":"your-own-network-running-from-a-macbook","status":"publish","type":"post","link":"https:\/\/www.wjst.de\/blog\/sciencesurf\/2014\/11\/your-own-network-running-from-a-macbook\/","title":{"rendered":"Your own network running from a Macbook"},"content":{"rendered":"<p>I need a local wireless LAN for about 100 mobile phones working as\u00a0message terminals for\u00a0an info screen projected to a white\u00a0wall. As I had an old, unused\u00a0Fritz! Box, I created a WLAN there but disabled DHCP as local domains are not supported by the Fritz! OS due to security constraints.<br \/>\nThen I installed dnsmasq on the Macbook and a packet sniffer to see what is going on.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nbrew update\r\nbrew install\u00a0dnsmasq\r\nbrew install wireshark --with-qt\r\n<\/pre>\n<p>while I could use the DNS server already available under Mavericks. But then things became difficult. Here is what finally worked for me. Not sure if this is really the best way to handle it&#8230;<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# need to be run as root\r\nsudo -s\r\n# WiFi off\r\nnetworksetup -setairportpower en0 off\r\n# set IP address, net mask, and router\r\nnetworksetup -setmanual Wi-Fi 192.168.1.2 255.255.255.0 192.168.1.1\r\n# set nameserver IP address\r\nnetworksetup -setdnsservers Wi-Fi 192.168.1.2\r\n# start nameserver\r\nlaunchctl load -w \/Library\/LaunchDaemons\/homebrew.mxcl.dnsmasq.plist\r\n# start DHCP server\r\nlaunchctl load -w \/System\/Library\/LaunchDaemons\/bootps.plistapachectl start\r\n# WiFi on\r\nnetworksetup -setairportpower en0 on\r\n# test local domain\r\ndig test.dev\r\n<\/pre>\n<p>And just for the records here are two configuration files for DHCP and nameserver including their directories.<\/p>\n<p>sudo nano \/etc\/bootpd.plist<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\r\n&lt;!DOCTYPE plist PUBLIC &quot;-\/\/Apple\/\/DTD PLIST 1.0\/\/EN&quot; &quot;http:\/\/www.apple.com\/DTDs\/PropertyList-1.0.dtd&quot;&gt;\r\n&lt;plist version=&quot;1.0&quot;&gt;\r\n&lt;dict&gt;\r\n    &lt;key&gt;bootp_enabled&lt;\/key&gt;\r\n    &lt;false\/&gt;\r\n    &lt;key&gt;detect_other_dhcp_server&lt;\/key&gt;\r\n    &lt;true\/&gt;\r\n    &lt;key&gt;dhcp_enabled&lt;\/key&gt;\r\n    &lt;array&gt;\r\n        &lt;string&gt;en0&lt;\/string&gt;\r\n    &lt;\/array&gt;\r\n    &lt;key&gt;reply_threshold_seconds&lt;\/key&gt;\r\n    &lt;integer&gt;0&lt;\/integer&gt;\r\n    &lt;key&gt;Subnets&lt;\/key&gt;\r\n    &lt;array&gt;\r\n        &lt;dict&gt;\r\n            &lt;key&gt;allocate&lt;\/key&gt;\r\n            &lt;true\/&gt;          \r\n        \t&lt;key&gt;dhcp_domain_name_server&lt;\/key&gt;\r\n    \t\t&lt;array&gt;\r\n        \t\t&lt;string&gt;192.168.1.2&lt;\/string&gt;\r\n            &lt;\/array&gt;\r\n    \t\t&lt;key&gt;dhcp_router&lt;\/key&gt;\r\n    \t\t&lt;string&gt;192.168.1.1&lt;\/string&gt;        \r\n            &lt;key&gt;lease_max&lt;\/key&gt;\r\n            &lt;integer&gt;86400&lt;\/integer&gt;\r\n            &lt;key&gt;lease_min&lt;\/key&gt;\r\n            &lt;integer&gt;86400&lt;\/integer&gt;\r\n            &lt;key&gt;name&lt;\/key&gt;\r\n            &lt;string&gt;192.168.1&lt;\/string&gt;\r\n            &lt;key&gt;net_address&lt;\/key&gt;\r\n            &lt;string&gt;192.168.1.0&lt;\/string&gt;\r\n            &lt;key&gt;net_mask&lt;\/key&gt;\r\n            &lt;string&gt;255.255.255.0&lt;\/string&gt;\r\n            &lt;key&gt;net_range&lt;\/key&gt;\r\n            &lt;array&gt;\r\n                &lt;string&gt;192.168.1.3&lt;\/string&gt;\r\n                &lt;string&gt;192.168.1.254&lt;\/string&gt;\r\n            &lt;\/array&gt;\r\n        &lt;\/dict&gt;\r\n    &lt;\/array&gt;\r\n&lt;\/dict&gt;\r\n&lt;\/plist&gt;\r\n<\/pre>\n<p>sudo nano \/usr\/local\/etc\/dnsmasq.conf<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\naddress=\/.dev\/192.168.1.2\r\n<\/pre>\n\n<p>&nbsp;<\/p>\n<div class=\"bottom-note\">\n  <span class=\"mod1\">CC-BY-NC Science Surf , accessed 13.04.2026<\/span>\n <\/div>","protected":false},"excerpt":{"rendered":"<p>I need a local wireless LAN for about 100 mobile phones working as\u00a0message terminals for\u00a0an info screen projected to a white\u00a0wall. As I had an old, unused\u00a0Fritz! Box, I created a WLAN there but disabled DHCP as local domains are not supported by the Fritz! OS due to security constraints. Then I installed dnsmasq on &hellip; <a href=\"https:\/\/www.wjst.de\/blog\/sciencesurf\/2014\/11\/your-own-network-running-from-a-macbook\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Your own network running from a Macbook<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[2916,2917,2915],"class_list":["post-7357","post","type-post","status-publish","format-standard","hentry","category-computer-software","tag-dhcp-server","tag-mavericks","tag-nameserver"],"_links":{"self":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts\/7357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/comments?post=7357"}],"version-history":[{"count":10,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts\/7357\/revisions"}],"predecessor-version":[{"id":7367,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/posts\/7357\/revisions\/7367"}],"wp:attachment":[{"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/media?parent=7357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/categories?post=7357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wjst.de\/blog\/wp-json\/wp\/v2\/tags?post=7357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}