http://stackoverflow.com/questions/19917148/tell-vagrant-the-ip-of-the-host-machine
を参考にすると下記。
netstat -rn | grep "^0.0.0.0 " | cut -d " " -f10
あとは記事のようにrubyでやるなら下記とか。
development:
host: <%= `netstat -rn | grep "^0.0.0.0 " | cut -d " " -f10` %>
【追記】これで取れるアドレスには終端に改行が含まれるかもしれない。その場合にはstrip!
とか使う。