-
Notifications
You must be signed in to change notification settings - Fork 78
Change virtualbox DNS address to 10.0.2.3 #247
Conversation
@njam before I commit this, can you give me the backstory on what has led to this PR? The fix seems benign, so I am thinking we should just commit it. |
I just stumbled upon this, while working on something else. I'm not sure why 10.0.2.2 works, but both addresses seem to work equally well:
|
Cool. I am planning to merge #249 on Monday/Tuesday and prep a release. If this isn't already merged, I will merge it at that time too. |
Merged as 1df2437 |
Reverting as @hferentschik would like to discuss this further. |
@@ -24,7 +24,7 @@ def redirect_dns | |||
def _target_host | |||
case provider | |||
when :virtualbox then | |||
'10.0.2.2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, what do we really want here? The IP of the gateway to the host or the IP of the nameserver? Is it not the latter? And if so, is 10.0.2.2 not the correct IP then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's good that you ask, I'm not sure 100% about this change!
Docs:
In NAT mode, the guest network interface is assigned to the IPv4 range 10.0.x.0/24 by default where x corresponds to the instance of the NAT interface +2. So x is 2 when there is only one NAT instance active. In that case the guest is assigned to the address 10.0.2.15, the gateway is set to 10.0.2.2 and the name server can be found at 10.0.2.3.
https://www.virtualbox.org/manual/ch09.html#changenat
So I think 10.0.2.3
is correct. But we can also leave 10.0.2.2
as nobody complained so far, and it worked just fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the other cases, it seems we are after the gateway here. The IP to reach the host. That's imo 10.0.2.2. I am tempted to leave it the way it is, since it works. I have not seen any actual errors around this. WDYT?
agree
|
Both work for me, but I think 10.0.2.3 is correct.