Airflow network access through raspberry pi 4 - raspberry-pi

I have been struggling a bit to get access to airflow from outsite my network.
I have airflow running on a raspberry pi 4, and all seems to be working just fine, I can access it via http://localhost:8080.
I have also set forwarding rules in my home router pointing to the raspberry pi:
The port forwarding is working since I can see it open using an external tool, and I have also set up a SSH port forwarding to access my raspberry pi from outside my local network.
So accessing http://my-public-ip:123 should be taking me to my aiflow web ui, but instead I just got "This site can't be reached".
Can anybody spot what I have done wrong or if I skipped any step of the process?
Thanks in advance.

Are you running Airflow with Docker or you have it installed? If using Docker, setting the webserver's service port to 127.0.0.1:8080:8080 it's the first step.
Secondly, you might need to look into the config webserver options. You will need to set the AIRFLOW__WEBSERVER__BASE_URL: 'http[s]://your_address/airflow' environment variable and install a reverse proxy (I suggest you nginx); you can find more details here. After you've done this, don't forget to also set the environment variable AIRFLOW__WEBSERVER__ENABLE_PROXY_FIX: 'true

Related

A standalone Rasp pi running a web server. Possible?

I have a rasp pi 3 which controls an irrigation system. The pi is headless, and is controlled via the home network by running a Tomcat server, which creates a UI. Mostly, the irrigation system is automatic, but I can log in to the Tomcat server to see the log of its activities, or change settings, or update the planting plan or manually control the sprinklers.
Now I'd like something similar, but in a place where there is no internet available. That is, I'd like to use the pi as a standalone web server, so that I can access the UI using a browser on my phone. I've looked through the rasp pi documentation, but it describes setting up access points, which seem to depend on a wired connection between the pi and the router. I've read about connecting via SSH to a standalone setup, but that article said that support for a standalone server isn't available.
Is what I'm looking for possible?
Thanks,
John

connecting wget to vpn

I'm trying to download some files using wget but the problem is the files will only download from specific servers how can I use wget over VPN?
p s: I tried use_proxy=yes -e http_proxy=[server]:[port] but it didn't work I need to connect to a VPN server not a proxy
Install a VPN on your machine first, then run the command
Proxies and VPNs are entirely different things. The proxy functionality won't be of any use to you here.
To use a VPN you have to setup a connection at the OS level (i assume linux ? but i could be wrong) - the wget tool itself wont be involved, you'll just run that after your connection is replaced with the VPN connection (no need for any special flags).
As for how you setup the vpn connection, that differs a lot based on the particular details of your situation. It could involve running openvpn yourinfo.ovpn or something like that, or your vpn provider may offer a separate application to set up the tunnel connection and then adjust your OS's routing table so traffic flows through the tunnel instead of to the normal gateway.

Remote.it and openVPN together

So this is a classic question that I’ve seen many times before...
I’m trying to connect to my home network when not at home using a raspberry pi.
I’m well aware that the way to go with this is to use a vpn server such as OpenVPN.
However, in order to connect to the vpn I would need to forward a port on my router... which I can’t do.
I’ve found remote.it which allows remote connection to a computer (pi) without port forwarding.
What I would like to know is how would I set about using the 2 together, I.e. connecting to remote.it which in turn connects me to my vpn server?
I'm sorry to be finding this question just now, but in case it's still useful to you or to anyone else, here's what you need to do:
Install remote.it
Set-up a remote.it connection to use the protocol (TCP/UDP) and port required by the VPN application
Make a remote.it connection/adding the service to your network (remoteit - Desktop application UI terminology)
Use this connection info (URL/port or localhost:port) with the VPN client
Send an e-mail to support#remote.it if you need help
I would recommend ZeroTier(https://www.zerotier.com/). It haves its own linux client , and you can connect to as many networks as you would like.
You can also configure IP address from the website.
There is also an Android an IOS app that is really simple to connect.

Deploy python API on Amazon EC2 Instances

I have created a script which is running on a localhost and port:5006 on EC2 instance. I am planning to make it run in the background even after I logout from SSH terminal. The question is that when I try to throw or reach to my script from my browser or Postman with the following link:
http://ec2-52-15-176-255.us-east-2.compute.amazonaws.com:5006/main?<myparametes>
Steps which I have done is:
1.) Created EC2 Instances of Linux flavor (Which is available in Free tier)
2.) Started the python script in virtualenv folder and listening to the port,
3.) Now trying to reach the IP and the port as mentioned above!
Apart from that, I haven't done anything else!
Please help me with understanding the concepts because there are no such tutorials available which serve straightforwardly
Agreed that the question is very broad, so starting from a basic step: have you created the proper security group for your instance that allows this 5006 port to be accessible from whichever network you are trying to?

apache camel - deploying with cxfs web service

I'm trying to deploy my camel app which on start is creating a cxfrs endpoint. The url is like this: http://localhost:9876 . When I try to hit this one on a rest client or anywhere within my machine it works. But when I try to access it using my phone or other external devices, I'm not able to connect.
Am I missing something?
TIA
Using localhost will mean it is only accessible to your local machine, using 0.0.0.0 instead should make it publicly accessible.
0.0.0.0 should bind all available network interface on your remote machine, but from your description, somehow it only bind to localhost|127.0.0.1 so only accessible from local machine, could you use
http://external.ip.address:9876/foo/FooService
instead to see if it helps?
Also, you can try to access other network service(for example start a tomcat on remote machine and see if you can access it from your local machine) from that remote machine to see if it works, this can determine if your DNS correct or if there's really no firewall between them.