Universal local network name resolution method without DNS? - networking

I'm writing TCP/IP code for a DHCP enabled network device. Is there a universal way this device can announce its hostname in-the-wild that pretty much all web browsers (on osx/linux/win) can access it by name? (e.g. http://mydevice/index.htm)
A solution that allows the end-user to use their "stock" computer without stringent requirements like installing packages such as bonjour for windows, have a dns server on their network, etc.
zeroconf/dns-sd doesn't work on windows machines that don't have bonjour (or similar) service installed and LLMNR doesn't work on osx machines out of the box.
If there is no single way of doing this, would conforming to both dns-sd and LLMNR cover most of the installed OS base out there?

From what I can gather, in order to cover hostname resolution in a dns-less network, ZeroConf/mDns/Dns-Sd and NetBios (NetBt) are required to cover windows based, and Osx based system (most linux systems also suppor ZeroConf).
NetBt doesn't support IpV6, and LLMNR is supported by Vista and onwards Microsoft developed operating systems. So a "universal" name resolution method might have to implement all three.

Related

Is it possible to have dual internet connection: Local plus internet?

So we have a local network at work that connects to the internet and can be accessed remotely from home. Every now and then the internet connection drops even though the local network is still functional. This prevents users from accessing the network remotely.
We need to have a backup computer which can be remotely accessed through a different internet connection (maybe a mobile stick or something). I am wondering if it is possible to have such a system setup where the computer is connected to the local network and at the same time use a different adapter to connect to the internet. The end result would be to have the remote user access network resources.
Any help would be much appreciated? I am thinking that the computer will treat the two connections as separate but I hope that I am wrong.
If you are using windows server then you can do that using routing and remote access protocol.
You can also use Microsoft Forefront Threat Management Gateway.
If you are an open source fan, then go for a PFSence comunity edition which is available on Linux platform.
There are many other options as well. if you can let me know which platform are you planning on then I can give you more details.

Tunneling a network connection into a VMWare guest without network

I'm trying to establish a TCP connection between a client machine and a guest VM running inside an ESXi server. The trick is that the guest VM has no network configured (intentionally). However the ESX server is on the network, so in theory it might be possible to bridge the gap with software.
Concretely, I'd like to eventually create a direct TCP connection from python code running on the client machine (I want to create an RPyC connection). However anything that results in ssh-like port tunneling would be breakthrough enough.
I'm theorizing that some combination of VMWare Tools, pysphere and obscure network adapters could be possible. But so far, my searches don't yield any result and my only ideas are either ugly (something like tunneling over file operations) and/or very error prone (basically, if I have to build a TCP stack, I know I'll be writing lots of bugs).
It's for a testing environment setup, not production; but I prefer stability over speed. I currently don't see much need for high throughput.
To summarize the setup:
Client machine (Windows/Linux, whatever works) with vmware tools installed
ESXi server (network accessible from client machine)
VMWare guest which has no NICs at all, but is accessible using vmware tools (must be Windows in my case, but a Linux solution is welcome for the sake completeness)
Any ideas and further reading suggestions would be awesome.
Thank you Internet, you are the best!
It is not clear the meaning of 'no NICs at all on guest'. If I can assume that, there is no physical NICs assigned for the guest is what is meant here. The solution is easy as a vmWare soft NIC can be provisioned for the guest VM and that will serve as the entry point to the guest netstack.
But if the soft NIC is also not available, i really wonder how and what can serve as the entry point to the netstack of guest, be it Linux/Windows. To my understanding, if thats what you meant, then you might need to make guest OS modifications to use a different door to access the guest netstack and to post/drain pkts from it. But again, when you do a proper implementation of this backdoor, it will become just another implementation of softNIC which vmware by default support. So, why not use that?
It's a bit late but a virtual serial port may be your friend. You can pick the serial port on the outer end via network or locally depending on your options. Than you can have some ppp stuff or your custom script on both ends to communicate. You could also run some tool to create a single socket from the serial link on the guest end if you want to avoid having a ppp interface but still need to tunnel a TCP connection for some application.
This should keep you safe when analyzing malicious code as long as it's not skynet :-) You still should do it with the permission of the sysadmin as you may be violating your company's rules by working around some security measurements.
If the VM 'intentionally' has no network configured, you can't connect to it over a network.
Your question embodies a contradiction in terms.

use dnsmasq to point .dev domains to one computer from all local networks to which it is connected

I'm running Apache etc (actually MAMP at the moment, but soon to be replaced by individual Apache, PHP, MySQL...) on my Mac, for testing my websites locally/offline.
I want to be able to test all my local sites (domains *.dev) from any and all of the following, without having to update the hots file on each device (some of which, such as un-rooted phones, don't even allow editing of the hosts file):
Obviously, my Mac itself...
Any device on any local network to which my mac is connected (My Mac doesn't necessarily always have the same IP address)
Any virtual machine running on my Mac (in Parallels) – primarily, various versions of Windows (my Mac does always have the same IP address on Parallels Shared Networking)
Now, I read that dnsmasq may be able to help, and have installed it on my Mac using Homebrew. I set it up to start on startup, and my dnsmasq.conf reads as follows:
address=/.dev/127.0.0.1
This has the effect of allowing any domain *.dev to work on my Mac itself, which is a start.
Next I tried to make it work in a Parallels VM by setting the DNS server to be the local IP address of my Mac. However, this doesn't work – because dnsmasq returns 127.0.0.1 as the IP for any lookup for *.dev, but of course this makes the VM look for the site on the VM itself, rather than on my Mac... which obviously doesn't work.
So I'm a bit stumped. Can anyone give me any tips? Is there a way to set up dnsmasq to do what I want, or should I be looking at another method?
Thanks!
I don't have any experience with Parallels but with Virtualbox you can set up a bridged network connection. I presume Parallels has something similar. This will set up an internal network (e.g. on 192.168.1.*) and you can probably assign fixed IP addresses to that. Like this you can give the Mac a fixed IP address which you can also use in your dnsmasq configuration - but you might want to have two TLDs for this so that .dev can keep pointing to 127.0.0.1 while .devel points to 192.168.1.xx.

Software version of network switch for VMs

I have hosted two images (both 2003 servers) from my VMServer. Including my desktop (xp-pro) there are three host.
I would like to connect them in a network (local LAN) without a physical switch.
Is there any software switch so that I can run in my desktop OS and let images use that interface to get IP automatically so that I can access Images from desktop OS?
Well you could use dynamips (+ GNS3), but just use VMware's virtual infrastructure:
http://www.virtualizationadmin.com/articles-tutorials/vmware-esx-and-vsphere-articles/installation-deployment/vmware-understanding-virtual-switch.html
i.e. You need to upgrade to at least ESX, now it's vSphere.
edit: Oh you really are on very basics of using a virtual machine: just use bridged networking:
http://www.vmware.com/support/ws55/doc/ws_net_configurations_bridged.html

client-server communication

We have written a client-server programme. Programme is running fine when we run both client and server on the same machine on different terminals by calling gethostbyname(127.0.0.1). We have to communicate between different machine. So my question is, how to determine the IP of the other machine (server's), and how to find out the IP of one's own machine. Is it simply chosen as something we wish? How to get hostname of the server and one's own machine?
Thanks
It's not clear what platform you are operating on but for Unix/Linux you can discover the IP addresses assigned to the interfaces on your system with the ifconfig command (you may need to be root to get to this, it's often found in the sbin folder), on Windows ipconfig will get you the same information.
Ideally you'd have domain name resolution set up on your network and would have a 'name' for the server, i.e. server.mydomain.com then you could use gethostbyname("server.mydomain.com"). For more information on domain name services (dns) you could do worse than start here: http://en.wikipedia.org/wiki/Domain_name_system
You cannot get the IP of the other machine in some magical way; you either have to know it or develop some sort of broadcast protocol in your network app, where the server or clients broadcasts their IP.
Getting your own IP depends on your platform and what language you use.
If this is a client/server environment, so the client is going to need to know the server address.
If you are using gethostbyname, then the name resolution systems that are actually supported (DNS, NIS, etc.) will vary by OS and system configuration.
The most common configuration is to use DNS. In this case, it is worth noting that the server cannot easily discovery its own name on the network (or name itself). This is because the naming service that the client will use is external to the server. The server has a local idea of what its hostname and it's resolver's default domain, but they are not necessarily the FQDN that DNS externally maps to the server's IP addresses.

Resources