I have a LAMP server which communicates with a web socket server, both on different Linux machines. Using them in a local network works. Now, I want to put only the LAMP server on Azure (Linux Virtual Machine) and continue to communicate with the web socket server. How can I solve this issue? I was thinking to use SSH tunnel. Is it the right way to proceed with Azure? How can I do that?
Thanks.
So I understand your architecture...
Does your LAMP "server" talk to your WebSocket server using ws://? If so, you don't need some sort of tunnel. That's one of the benefits of the WS protocol; its web-friendly.
or
Does your LAMP "server" talk to your WebSocket server via TCP for some reason? If so... why not use the WS protocol? Or if you really need TCP, then you would need some sort of tunnel, either SSH or something like Kaazing KWIC on Azure.
Full disclosure. I work for Kaazing.
Related
I'm trying to develop a web application in nodejs. I'm using an npm package called "simple-peer" but i don't think this issue is related to that. I was able to use this package and get it working when integrating it with a laravel application using an apache server as the back end. I could access the host machine through it's IP:PORT on the network and connect a separate client to the host successfully with a peer-to-peer connection. However, I'm now trying to develop this specifically in node without an apache back end. I have my express server up and running on port 3000, I can access the index page from a remote client on the same network through IP:3000. But when I try to connect through webrtc, I get a "Connection failed" error. If I connect two different browser instances on the same localhost device, the connection succeeds.
For reference: i'm just using the copy/pasted code from this usage demo. I have the "simplepeer.min.js" included and referenced in the correct directory.
So my main questions are: is there a setting or some webRTC protocol that could be blocking the remote clients from connecting? What would I need to change to meet this requirement? Why would it work in a laravel/webpack app with apache and not with express?
If your remote clients can not get icecandidates, you need TURN server.
When WebRTC Peer behind NAT, firewall or using Cellular Network(like smartphone), P2P Connection will fail.
At that time, for fallback, TURN server will work as a relay server.
I recommend coTURN.
Here is an simple implementation of simple-peer with nodejs backend for multi-user video/audio chat. You can find the client code in /public/js/main.js. Github Project and the Demo.
And just like #JinhoJang said. You do need a turn server to pass the information. Here is a list of public stun/turn servers.
I have a nodejs webserver running on a vserver (rented by me) and a local Raspberry Pi node server.
I dont want to open any ports for beeing accesable from the webserver.
My problem is that I want to create a web application you can interact with and the rpi should do things when any button is pressed on the webserver.
I thought it would be smart to create a json file on the webserver and my local server would listen on the json file.
Is there any better Idea?
Thx for your advice!
your problem can be solved using reverse proxy softwares that establishes secure tunnels from a public endpoint such as internet to a locally running network service.
ngrok is one of the best that I prefer to use.
To establish a communication between the raspberry and the webserver you need to open a port on the webserver.
However, you can restrict it to allow connections from the raspberry pi IP address only. Or do the connection via ssh and let the raspberry pi authenticate using its public key.
I'm not sure whether to ask this question on a programming forum or linux administration forum as it involves both programming with web sockets and server admin. Basically I am trying to follow this guide "http://41j.com/blog/2014/12/simple-websocket-example-golang/". I have a centos basic server that has a static IP and I've port forwarded it to ports 22 and 80 (ssh and http). I can compile and run the server app fine, but i cannot connect the client. I'm currently out of ideas since I've never messed with networking before. I read somewhere that html5 websockets go through ports 80 and 443 when given an external IP. What I want is to start the server app on port say something like 1445 and then lets pretend my external IP is 244.214.21.44 and then have client connection string look like 'ws//244.214.21.44:1445/echo'. What am I missing, do I need to install apache or something?
Thanks for reading.
If I am running a local server that is hosting a video chat application what is the best way to test the application with another user? Lets say I have two computers, is there a way I can allow computer B to connect to the local server that is running on computer A? The goal is to simply test whether the video chat application works properly in two completely different browsers running on separate computers. If there is a way I can trick the app into thinking the computer that is running the local server is another host, please let me know.
But Remember that the app needs access to the computers webcam. Thanks!
Addition Info: Nodejs application that uses the Tokbox, express, and socket.io APIs
Just make sure your web server is listening on a routable IP like "0.0.0.0", which you specify when you call http.createServer(port, ip, handler). Then point the browsers at the server's IP address such as http://192.168.1.1:3000 (fill in your specific IP and port). You can use the command ifconfig -a on linux or osx to get your server's local IP address, and ipconfig on windows.
I would like to be able to use my web server as a Usenet 'proxy', how would I configure iptables to forward the packets correctly?
My Usenet client will connect to my web server and the web server would make the connection to usenet.
Thanks,
Luke.
I think what you really should be using is an ssh tunnel, not a proxy. It will do what you want (bounce traffic between your webserver when you want to connect to an nntp server) without installing any special software on your webserver. Iptables isn't really going to help you here.
http://www.rzg.mpg.de/networkservices/ssh-tunnelling-port-forwarding