Which VNCServer port to use to connect to home computer? - ports

I want to connect to my home computer from the library via a VNCServer located on my home computer, but I'm pretty sure the library blocks the port 5900 and higher. Can I change the port which my vncserver listens to get around the blocked port? Which port probably would allow me to get around the library's port blocking? Is there anyway I can test which ports are open at the library?

The VNCServer is running on your home machine, it shouldn't matter what ports are blocked in the library. You are in the library(with your laptop?). The library blocking ports 5900+ only stops incoming connections (coming into the library) from using those ports not from you connecting to other device's port on that device's port number.
You can check from the library if your port/IP is visible using things like : http://www.canyouseeme.org/

Related

Can cooja connect to mosquitto server in ubuntu?

I am new to contiki os and i am trying out mqtt in contiki os. But i had problem connecting my mote in cooja simulator to my mosquitto server on my ubuntu desktop. So is it possible to do that? I am trying to use IPv4 for this and my example for mqtt come from https://github.com/esar/contiki-mqtt
Thank you
Yes, it is possible.
You need a RPL border router node with SLIP (Serial Line IP) enabled (I have never simulated physical Ethernet port in a node on Cooja).
In your RPL border router, open the "Serial Socket (Server)" and in the Linux console, run tunslip6 to connect the RPL tree into your local network.
This is a tutorial: http://anrg.usc.edu/contiki/index.php/RPL_Border_Router
After the tunslip6 is running, there's no difference from running the nodes physically, it's the same setup.
Now your nodes will be able to find your mosquitto server in the static IPv6 address you've configured. I remember to be using "aaaa::1". To be sure the network is up, ping6 your RPL border router.
ps: If it is a production application, you might not want to use MQTT. Nor TCP or packet segmentation scale well in the RPL, also MQTT can have fat payloads. Go UDP with CoAP or MQTT-SN.

Bluez, multiple GATT servers running on the same computer

In other socket applications you can’t open a port that is already in use but bluetoothd seems to accept several listening GATT servers running in parallel, how is that possible?
I try to setup a GATT server using bluez 5.35 on Raspberry Pi Jessie. I have made an application that starts the GATT server much like the example btgatt-server.c using l2cap socket. I have a custom characteristic that a client application can connect and use. I have also setup to enable advertising using hci commands (it is set to enable just after listen() command on the socket).
I have done so the application auto start in rc.local. My problem is that after reboot, sometimes I don't see my own characteristics but I get a complete other list of services/characteristics. If I don’t start my own application and only enable advertising (sudo hciconfig hci0 leadv) I see the same list so it seems to be running a GATT server by default.
What mechanism in bluez decide if my services/characteristics or the other ones (I guess loaded by default plugins) are visible? They are never combined and visible at the same time and I don’t see any error messages during my application startup even if I can’t see the characteristics from the client and don’t get anything by accept(). How can I be sure my characteristics is always visible?

How to run Client-Server on different computers using Sockets in C

I am able to run a client and server on the same computer on two different terminals in Linux. Now I want to run the same model on two different computers. I am guessing there is more to this than just changing the IP address and the port number to that of the Server.
Any guidance on the matter is highly appreciated.
Thanks.
Make sure the port is forwarded in your router and exceptions for the port is added to the firewall. Then you should be ready to go!
If you have the computers in the same network you can do it without forwarding your port.

listening to communication between a local application and a device

I have a windows application on my PC which connects to a device over telnet. It sends a series of commands to the device, and the device responds to it.
Is there any way I can listen to what that program is writing to the device?
I tried using win32 socket programming to create a client that connects to the application. But, I get an error saying connection refused. When I analyze the traffic between the application and device on wireshark, I can see that the application uses different ports each time it reads from or writes to the telnet port(23) of the device.
Is there any way I can read the commands sent by the program to the device?
If you want to capture program's output to the device
programmatically, the right way is not to connect to the program (you
can't tap into an existing connection), but instead provide a server
that will stand for target device from the program's point of view.
It's going to work if the program can be configured to connect to the
device at different address and port. Write a "proxy" that listens on
some fixed port, and for any accepted connection, opens a client
connection to the real device. Then it should forward data in both
directions between the accepted connection from the program and the
client connection to the device. During this, you can also parse data
or do whatever you want with them, e.g. forward them to yet another
connection to another real device.

Address already in use while executing C socket programme

Hii All,
While running a socket programme (server side ) am getting message like
Address already in use
Am trying to connect to port 80 since port 80 is reserved for https application So before running server side programme i am closing all application that uses https application ,is it enough...
or am doing it wrong??
Am trying to make a communication between browser and termial...
You must run your application as super user(root) on Linux or administrator privileges on Windows in order to bind to port 80. This is the case for all service ports, which is < 1024. Either that or there still is another program binded to that port.
Try using netstat to find out what programs might be listening on port 80.
Example:
on Linux:
netstat -punta
on Windows:
netstat -ban
Both must be run with super user/admin privileges in order to see the program names that bind to specific ports.
If you just closed another process listening on 80 port, this port will be blocked for a certain timespan depending on your OS. This behavior is here to prevent an attacker to crash a service on your machine and immediately restart a malicious service on the same port.
This behavior can be disabled by using SO_REUSEADDR (by using setsockopt).
If your main problem is to communicate from a custom server to your broswer, you can use any port in your server for providing HTTP (8080 is common for that), just specify the port in the url http://server:port/ (ie. http://localhost:8080/)

Resources