{"action":"created","issue":{"url":"https://api.github.com/repos/churchers/vm-bhyve/issues/103","repository_url":"https://api.github.com/repos/churchers/vm-bhyve","labels_url":"https://api.github.com/repos/churchers/vm-bhyve/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/churchers/vm-bhyve/issues/103/comments","events_url":"https://api.github.com/repos/churchers/vm-bhyve/issues/103/events","html_url":"https://github.com/churchers/vm-bhyve/issues/103","id":167108593,"number":103,"title":"vm switch nat on fails to create reasonable pf-nat.conf","user":{"login":"anteract","id":1554315,"avatar_url":"https://avatars.githubusercontent.com/u/1554315?v=3","gravatar_id":"","url":"https://api.github.com/users/anteract","html_url":"https://github.com/anteract","followers_url":"https://api.github.com/users/anteract/followers","following_url":"https://api.github.com/users/anteract/following{/other_user}","gists_url":"https://api.github.com/users/anteract/gists{/gist_id}","starred_url":"https://api.github.com/users/anteract/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anteract/subscriptions","organizations_url":"https://api.github.com/users/anteract/orgs","repos_url":"https://api.github.com/users/anteract/repos","events_url":"https://api.github.com/users/anteract/events{/privacy}","received_events_url":"https://api.github.com/users/anteract/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-22T18:50:46Z","updated_at":"2016-07-24T21:13:09Z","closed_at":null,"body":"Docs say do this:\r\nA $vm_dir/.config/pf-nat.conf file is created which contains pf nat rules for this bridge. We also automatically add an include statement to /etc/pf.conf pointing to this file.\r\nWell, on my system, all that happens, but the contents of the file in .config/pf-nat.conf is exactly as follows:\r\n\r\n    # vm-bhyve nat\r\n\r\nNot really doing what we want.  IP gets assigned, the include gets added to pf.conf, etc., just nothing else in that .conf file.\r\n\r\nEdit:  More digging in vm-switch.  Not seeing the lines added to the dnsmasq configs either.  Almost like its ignoring part of that function where it writes to these config files.\r\n\r\nSomeone smarter than me perhaps can fix this?  Please?  "},"comment":{"url":"https://api.github.com/repos/churchers/vm-bhyve/issues/comments/234802735","html_url":"https://github.com/churchers/vm-bhyve/issues/103#issuecomment-234802735","issue_url":"https://api.github.com/repos/churchers/vm-bhyve/issues/103","id":234802735,"user":{"login":"anteract","id":1554315,"avatar_url":"https://avatars.githubusercontent.com/u/1554315?v=3","gravatar_id":"","url":"https://api.github.com/users/anteract","html_url":"https://github.com/anteract","followers_url":"https://api.github.com/users/anteract/followers","following_url":"https://api.github.com/users/anteract/following{/other_user}","gists_url":"https://api.github.com/users/anteract/gists{/gist_id}","starred_url":"https://api.github.com/users/anteract/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anteract/subscriptions","organizations_url":"https://api.github.com/users/anteract/orgs","repos_url":"https://api.github.com/users/anteract/repos","events_url":"https://api.github.com/users/anteract/events{/privacy}","received_events_url":"https://api.github.com/users/anteract/received_events","type":"User","site_admin":false},"created_at":"2016-07-24T21:13:09Z","updated_at":"2016-07-24T21:13:09Z","body":"Additional Note.  This part of switch::nat_init is the part that isn't firing, everything above and below it worked.  I typed this into the 2 different config files manually (replaced variables with proper labels) and it all works fine.  ~line 493 in vm-switch\r\n\r\n        if [ \"${_nat}\" = \"yes\" -a -n \"${_id}\" ]; then\r\n            _bnum=$(echo \"${_id}\" |awk -F'bridge' '{print $2}')\r\n            _net24=\"172.16.${_bnum}\"\r\n\r\n            echo \"nat on ${_gw} from {${_net24}.0/24} to any -> (${_gw})\" >> \"${vm_dir}/.config/pf-nat.conf\"\r\n            echo \"\" >> /usr/local/etc/dnsmasq.conf.bhyve\r\n            echo \"interface=${_id}\" >> /usr/local/etc/dnsmasq.conf.bhyve\r\n            echo \"dhcp-range=${_net24}.10,${_net24}.254\" >> /usr/local/etc/dnsmasq.conf.bhyve\r\n\r\n\r\nSide note, you only reload pf, not dnsmasq after these changes.\r\n2nd side note, make the dnsmasq.conf.bhyve changes an included file in dnsmasq.conf like you do in pf.conf.  works fine and less to fiddle with.  on mine the last line of dnsmasq.conf is this:\r\nconf-file=/usr/local/etc/dnsmasq.conf.bhyve\r\n\r\n"}}
{"actor":{"display_login":"anteract"}}