def default_ip
      begin
        orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lookup, true  # turn off reverse DNS resolution temporarily
        UDPSocket.open do |s|
          s.connect rand_routable_daddr.to_s, rand_port
          s.addr.last
        end
      ensure
        Socket.do_not_reverse_lookup = orig
      end
    end
def default_ip
      begin
        orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lookup, true  # turn off reverse DNS resolution temporarily
        UDPSocket.open do |s|
          s.connect rand_routable_daddr.to_s, rand_port
          s.addr.last
        end
      ensure
        Socket.do_not_reverse_lookup = orig
      end
    end
Determine the default ip address, taken from packetfu's utils.rb