How get access to LAN IOT devices with DO + OpenVPN? - iot

I've fake IP in local network for some IOT, like 192.168.1.11, 192.168.1.15 etc. My LAN connect to Internet via provider with fake IP too, like 10.10.10.15. I've task connecting (REST) to my IOT-device through Internet. For that I want use DO droplet with real IP(for sample 178.62.209.11) and setup OpenVPN on it. For my home LAN I've buy the Mikrotik Router RB951Ui-2HnD which must allow setup the OpenVPN client. So, my LAN with DO Droplet must be VPN.
And now my question is how to do traffic translation from MY SERVER 178.62.209.11 to LOCAL device IOT 192.168.1.11? I understand that my server have only one IP, but I look that may be port forwording! For sample, if I want send request to my IOT device by 80 port, then I can use for that port forwards, like 178.62.209.11:1234 <=> 192.168.1.11:80, and for second IOT device 178.62.209.11:1235 <=> 192.168.1.15:80, and etc.
I found how to set OpenVPN to DO Droplet, I found how adjust OpenVPN client on the router, but can not found how get simple access to my device. Can you help?

Related

How to access server behind an acccess point router, which is behind my ISP router?

I can successfully SSH into my server if I connect that PC directly to my ISP provided router (point 1 below), with port forwarding etc.
However I need to connect another router as an access point first, and then connect my server PC to that router(point 2 below).
Thus the connection changes from:
1. ISP router - LAN cable - Server PC
TO:
2. ISP router - LAN cable - access point router - LAN cable - Server PC.
I just plug the LAN cables in as in the second scenario above, and internet etc works on all my PC's, including the Server PC. I have tried changing IPv4 settings, port forwarding on both routers etc.
You either:
port forward (1) from your ISP router to your AP router and port forward (2) from your AP router to your sever PC (fixed IP)
or you inform the ISP router of the subnet created by the AP router, by adding the subnet to the ISP's routing table (if you've access to the routing table).
Or, unless you really need the AP to act as a router, check if you can configure it as a regular switch so the whole network will be one subnet. Doing so, you can stick to your initial setup.

Port is still close after portforwarding

I'm running a FTB Revelation server on my Synology-NAS and I can connect in the intranet, but when my friends or I want to connect with my public-ip, they can't connect.
A portforwading tester says, that the port is closed.
I'm using a fritzbox and my ports are opened.
What could be the problem?
I had this issue too. You probably need to call your Internet Provider and ask if you have a dedicated IP. Port forwarding for ipv4 only works with dedicated IPs.
You can use NGROK (https://ngrok.com/) to "bypass" port forwarding, but server's IP will change every time you restart NGROK, and you will not be able to see player's true IPs in the server (You will see, for example, 0:0:0:0:0:0:0 instead of 93.22.22.22)

Port forwarding, DMZ, turning off firewall and adding port doesn't work to reach out port

I am using Windows 10 with IIS 10.0
I am publishing website on IIS and I need to reach it with public ip.
What I did;
* Port forwarding through router
* Adding DMZ with my local IP
* Turning off firewall
* Adding port to firewall inbound rules with allow edge traversal
I can connect with internal IP like 192.168.1.75:81
I get "System.Net.Sockets.SocketException A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond from [MYPUBLICIP]" when I try to reach it like MYPUBLICIP:81
What are the possible scenarios that blocks to port?
Thanks.
As far as I know, the error message means there is no server listening at specified ip/port that you are trying to connect to.
In my opinion, you should firstly make sure your client machine could access your server by using this MYPUBLICIP address.
Then I suggest you could try to make sure the port 81 is your IIS web application port.
Besides, I suggest you could try to open your event viewer to find out the details error message.

How to get HTTPS URL logs using SQUID

I need URL logs on my network using SQUID and Mikrotik I am able to get HTTP traffic, but I am not getting HTTPS traffic. How to get HTTPS traffic using SQUID and Mikrotik? another way is also fine.
I run a DNS server, with that, I log the DNS requests on the mikrotik.
username || DNS/URL (website.com)
A quick way to test:
Download and install pi-hole on a rapsberry pi, make that the DNS server of your mikrotik and then in pi-hole you will see the DNS queries for each client on the mikrotik. You can then use the actual files on the raspberry pi to create an API for you or use the build in APIs in pi-hole.
Not sure how to do this via squid or web proxy.

I can't connect my MQTT Broker

I'm working on IoT project and trying to use mqtt protocol. So I need a Mqtt broker as a server installed on my PC. My PC has static ip and special modem. So my local and general ip is lookin same.
I installed mosquitto firstly. Tested it with Mqttlens chrome app, it looks everything is fine when I test it on the same computer (which is the computer on which broker is installed). But when I try to publish a message from another device with different ip, I can't connect to broker.
I installed Hivemq and tried it for this broker too. And it is the same so I can connect broker when I open mqttlens in same computer, but I can't connect to my broker from other device.
And here is what I already tried and tested;
I downloaded My MQTT application to my android mobile phone.
And connected to hivemq broker with broker.hivemq.com url.
In the same time in different two pc's I connected to the broker with mqttlens app. I set up the tags. And everything is working, I can send messages and subscribing topics. Everything is working well. I tried it when that third device in the same lan and when using different networks. Both time, everything is fine.
But when I try the same thing by writing the my ip address to the mqtt lens and MyMQTT application. Other devices even can't connect to broker. There are no error messages or anything else. Just disconnected and can't connect.
I tried to change bind address with my ip address. But when I write 0.0.0.0 or my ip address, result is same I couldn't connect.
Any suggestions?

Resources