I need to get using Ruby the local-IPv4 address of remote machines through stateless connection. Running this UDPSocket call on Windows 2008(non R2):
UDPSocket.open do |s|
s.connect remote_machine_name, 1
puts s.addr.last
end
always returns the IPv6 address even though IPv6 is disabled. Running on other windows platforms seems to be OK, any ideas why this fail on w2k8? any alternatives?
related link: How to get my machine's IP address from Ruby without leveraging from other IP address?