Rewrite get_lan_ip() to use ifconfig

socket.gethostbyname() would give me (socket.gaierror: [Errno -5] No address associated with hostname) errors, rewrote get_lan_ip to use ifconfig instead