FlightAware Discussions

How to change static IP

I have set up piaware to use wlan0 and set a static IP in piaware.conf as xxx.xxx.xxx.194. There is another application running on the pi that is using eth0 on a static IP xxx.xxx.xxx.193.

The problem is the My ADS-B page on Flightaware shows the local IP for piaware as xxx.xxx.xxx.196. For some reason, piaware isn’t picking up the IP assignment in the .conf file.

ifconfig shows wlan0 on IP xxx.xxx.xxx.194. How to I get piaware to use that address?

The My ADS-B page reports a local IP which is the IP of the interface used to route outbound traffic towards the FlightAware servers.

(specifically, it looks at the source IP named in ip -o route get to 70.42.6.191)

I assume you are using a piaware sdcard image given that you’re managing the network config out of piaware-config. The piaware sdcard image, if configured for both wifi and wired ethernet, sets up default routes in parallel with the metrics set so that the wired-ethernet interface is preferred over wifi when both are up.

If you are not using the piaware sdcard image, then the network settings in piaware-config.txt or piaware.conf have no effect. They are sdcard image only settings.

If you have an unusual network configuration (routing traffic differently based on application counts as unusual) then the piaware sdcard image is not suitable for that - please start from a vanilla Raspbian image and configure the networking by hand as needed.

Thanks. I’m not using a piaware SD card, so those files cannot be used to configure piaware.

My question is–how then do you configure piaware? How do I tell it to use wlan0?

piaware (the feeder software) has no real knowledge of the underlying network setup, it just uses whatever has already been configured, like any other application.

If you want to route piaware traffic over a different interface, you will need to configure the network stack itself to do this. I’d suggest either

a) adding a static route matching the FlightAware IP blocks so that traffic destined for FlightAware is routed via wlan0; or
b) looking into the iptables owner extension module, which lets you tag traffic based on the uid/gid owning the socket; or
c) looking into iproute2’s ip rule add uidrange

(I’m not clear why you’d want to do this, but it’s certainly possible)

I want to run piaware on wlan0. I have another application that needs internet access and that I want to run at the same time. They can’t use wlan0 (or eth0) simultaneously, right? So one has to use wlan0 and the other eth0.

What I need to know is how to force piaware to use a particular static IP on wlan0.

The easy way is to make an ip reservation for that mac address on your DHCP server.

Of course they can.

If they try to use the same port to listen on, change the port one of the applications is using.
Much easier approach.

To get rid of dump1090-fa listening on port 8080 take a look at /etc/lighttpd/conf-available/89-dump1090-fa.conf
After saving changes restart lighttpd.

I meant to say that 2 apps can run simultaneously, one on eth0 and the other on wlan0.

Changing 89-dump1090-fa.conf didn’t work.

Let me try to explain the problem. I’ve configured static IPs for wlan0 and eth0. They show up correctly when I run ifconfig.

I have pihole assigned to eth0. Somewhere piaware is assigned to IP x.x.x.196. That’s the address that appears on the Flightaware web page for ADS-B feeder statistics; it shows the “Site Local IP” as x.x.x.196.

That suggests there is some setting within piaware to assign a static IP address, but I don’t know. But there’s something telling piaware to use x.x.x.196.

You’re missing the main issue that they both use lighttpd.

After a short google with these terms: pihole flightaware

You’re making this all terribly too complicated.
Make them both work, use /dump1090-fa and ignore port 8080 …

Thank you so much for your help.

If I’m making it too complicated, it’s because I don’t know enough about Linux. Sorry.

I modified the external.conf file. Now Skyaware opens on the right page, but things are not right.

The map shows Italy, not my location. But the listing of aircraft are from my location.
And the Flightaware profile page still shows the x.x.x.196 IP address.

Configure the dump1090-fa location then.

Who cares about the IP on the profile page … you know the IP anyhow.

Thanks. But how do I configure the dump1090-fa location?

Also, the aircraft listing on my Skyaware page is not from my receiver; it’s from Flightaware. And I can scroll the map from Italy to my location, but again, there appears to be no connection to my receiver.

Which suggests to me that the receiver is using a different IP address. xxx.xxx.xxx.196

Skyaware displays only local data (+ mlat results derived from that local data)

Click on the gear icon on the right side of the stats page. piaware will feed the location set there down to dump1090-fa.