I have a proprietary application running in my PC that listens to a specific IP address broadcasts in the NIC I bind him to.
I did an application to generate this UDP broadcast packet but the other application doesn't 'see' this packet when I have it running on the same PC. If my application is run in other PC within the same physical network it does detect.
I tried the following configurations none of them worked:
Proprietary app bound to Local Interface main IP.
My application bound to Local Interface 2nd IP.
and
Proprietary app bound to Local Interface main IP.
My application bound to Microsoft Loopback Adapter IP.
All communication is happening per Wireshark debugging, all applications send the right packets, except the Proprietary application never 'recognizes' my application.
The platform is Windows 7, and my application was done with QT, it mainly binds to the network IP with sharedaddress and writedatagram to the broadcast address.
Thanks
Related
I have successfully compiled source code of doubango opentelepresence system (An open source video conference MCU) and successfully tested. I can make video calls through desktop version and using webrtc (sipml5 client) with Chrome and Firefox (with some modifications because the sipml5 was not compatible with newer versions).
Now my problem is with NAT traversal. I want to make video calls between clients behind NAT using turn server. The MCU server is behind NAT (SIP port is on public IP using port forwarding and tcp sip and ws connection is available). I have installed coturn Turn Server on a ubuntu system, and configured it using command line as like why the turn server does not support for the tcp connection. The turn server ports is open on public ip. I have also tested both udp and tcp but not successful.
On the mcu, ice, stun and turn is enabled. I have set turn server url and credentials correctly and the mcu can successfully communicate with turn server. Also webrtc on the browsers can successfully communicate with turn server (I say successful communication, because I can see candidates are being generated).
I have two major problems:
For some reasons related to firewall, I prefer to use only tcp relay. But in test environment, I have tested both with udp and tcp but not successful. It seems doubango opentelepresence does not support relayed tcp, because I cannot see any candidate with relayed tcp (there are udp relayed candidates).
What is wrong with my configuration which I was never successful on making a call. The ICE candidates are generated with public ip, but their state is always failed or frozen (what does frozen mean!). If you have any suggestions, let me know and try. I can test and report results here until reach a successful video call.
Yellow parts are public IP address (a valid IP address accessible on the internet for all clients).
I am planning to create a very simple home\office monitoring system, where I will be able to connect sensors using Mosquitto broker on a Raspberry Pi. The sensors will publish data to the broker and I will be able to see the data as a subscriber.
I have a publisher that periodically publishes messages to the Raspberry Pi (Mosquitto broker) in the house in the same LAN network. But I want to connect a sensor that will be located at my office to the same broker, so the connection can't be except online.
The problem that I am facing at the moment is that I want to connect a sensor to the Raspberry Pi but I need to do it over the Internet given the limitations of hardware. How do I connect the sensor to publish to the broker that resides in the Raspberry Pi from outside the LAN network? I just checked and my public IP address could have thousands of addresses underneath it, how do I know which one is me and connect to it?!
Somewhat depends on your home network. If your ISP uses so called "Carrier Grade NAT" which is increasingly common due to the fact that few IPv4 addresses are now available, you cannot make a connection from the Internet to your local network.
Otherwise you can make a connection inwards and so your remote sensor just needs a TCP/IP connection. We would need more information on the sensor to show you how to do that. To find your public IP address, you visit https://www.whatismyip.com/ from a computer on your local network. (To find out if you are stuck with carrier grade nat, ask your ISP or do a reverse lookup on your public IP address, you may be able to tell). You will also need to configure the firewall on your router so that it allows inbound connections to a PORT that you choose (on the outside) and map that to the internal IP address of the Pi and the port configured on Mosquitto for handling MQTT traffic.
For carrier grade NAT or if you cannot configure your router's firewall to allow incoming connections, you should use another MQTT broker on the Internet somewhere. Then configure your Pi broker to bridge to the Internet broker.
The Owntracks documentation has a quick tutorial. There is also information in the Mosquitto documentation on how to do this.
In this case, your Pi broker is making a connection out to the internet which works fine on any WAN if you are not excessively blocking outgoing traffic.
In either case, do not forget that any traffic over the Internet is insecure. You will need to set up SSL certificates along with a username/password combination to secure the traffic.
Easy!
Just add a port forwarding (in your local router 192.168.x.x) to your raspberrPi ip and MQTT (usually port 1883).
Then your sensor should be connected to internet and send a topic/payload to your public IP address at home...
I do this for android apps
- owntrack
- juiceSSH
- raspicheck
- myMQTT
- openHAB
- Yatse (For Kodi remote)
But do not forget when you open a port you will need to secure it access somehow...
and your public i.p. can be automatically change by your ISP (InternetServiceProvider)
I am running an Ubuntu server with my laptop through an Orcale VirtualBox and I try to maximize the bandwidth of my home server, as it really slows down my internet connection. My router supports up to 300Mbit upload/download speed and my laptop wifi's card up to 150bit.
I configured my server with the following(static IP, configured by vim /etc/network/interfaces):
auto eth0
iface eth0 inet static
address 192.168.1.240
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1
192.168.1.1 is my default gateway, and I just configured a static IP which ends with 240.
When my laptop's WIFI is on, I can easily access the server's files(.html files etc) through chrome from any computer on my house, as I just need to enter the server's IP into the browser, plus I can access the server through SSH. But when It's off, I can't even access the server's HTML files through the laptop itself, though I can see that the server is still running on VirtualBox. When I turn the WIFI once again, I can run services which require Apache2 but they really slow my internet connection, as a result I can barely surf the web. I am trying to configure the server to use only the bandwidth of my router, since my actual internet connection is 30 Mbit download and 1.90 Mbit upload(according to speedtest), and It probably interferes with it. Is it possible to access the server without WIFI connection, so it will purely use my router's speed?
Any help would be appreciated.
1) Looks like you using bridged networking in VM config. When your network adapter is connected to real network - you can interact with your VM via network bridge. When it's not connected - your bridge is also closed. If you need to interact with your VM without WiFi connection - you can add one more virtual network adapter to you VM config: use "Host-only" adapter and configure it on both VM and host PC. Your VM will use new host-only adapter to interact with your PC, and old bridged adapter to interact with other network.
2) Check your WiFi speed near the router. Maybe it's too far or provides too weak signal.
PS. Sorry for my poor english.
does anybody know an API that allows to send and receive data to/from a VMWare guest system without using an IP network?
I have to communicate with a program inside a VMWare guest but the guest is not allowed to have an IP network. As file transfers into the VM via Drag&Drop are possible I assume that there is an API - I just need to know if this API is open to 3rd party programmers or if it is only available fro the VMWare Player itself.
Sure, you can access those with the VIX API.
More specificely, the Drag&Drop is implemented with following functions:
VixVM_CopyFileFromGuestToHost
VixVM_CopyFileFromHostoGuest
Basically all VixVM functions may be relevant for your tasks. They are all documented in the official VIX API reference.
It turns out that there is a solution for my problem:
Virtual Serial Port
VM-Ware allows to create virtual serial ports for the guest that are connected on host side to a named pipe.
I therefore created two helper programs, one on host side which listens on a TCP port and a specific named pipe and transfers all the incoming data between them.
A second helper program runs in the guest VM and does the same between the serial port and the TCP port I want to access.
The only draw-back is that the serial speed is limited to 128kBit/sec. May be that can be increased by using multiple virtual serial ports...
Virtual Machine Communication Interface (VMCI)
Using VMCI there is an API for creating a shared memory region that is accessible from both hast and guest system.
I created a vb .net app and basically it connects to the server (my brother's computer at his house) and sends messages. The problem I'm having is, we both have routers. The only way I'v gotten all of this to work, is by both of us connecting ppeo broadband and then our ips work, otherwise the "real ip" is used for all the pcs in my house. How can I connect tcp to him wothout him having to connect broadband. Because to connect broadband he needs to be connected to an ethernet port, so then he cannot be wireless.
Thanks
I don't know what you mean by "connect broadband", but if the computers are not on the same local network, and you have a NAT router in between, you will either have to connect them via a VPN (like Hamachi for example) or configure port forwarding on both sides on the routers.
See: How do you get Java sockets working with public IPs?
Some routers also have "Dynamic Port Forwarding", where if you are using, say port 8084 for your traffic, both your and your brother set your routers to dynamic port forward port 8084.
The router then listens for client computers connecting across port 8084, and when it sees that traffic, it will route traffic across that port to the client computer that first requested it.
Another popular "NAT-traversal" technology is UPnP. See this SO question and associated article for more information on how to use .NET to control UPnP. Again, router hardware must support it and be configured to use UPnP.
Edit: Untested, but you could try also to use and IPv6 tunneling software such as the one from go6 to create a public IP. This is like VPN, but one-sided, and less private.
Rather than router configuration, you could use a VPN. Hamachi is free and easy.