Aydan
Posts: 729
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, near Lake Constance

avahi-daemon gives IP of wrong network

Mon Mar 10, 2014 7:01 pm

I have the following setup:
Laptop connected to raspi via wired ethernet (Raspi is DHCP server for this one)
raspi connected to phone via WiFi (Phone is acces point)
I have avahi-deamon and dnsmasq running on the pi.
The pi is supposed to bridge the connection for the laptop/whatever not wifi capable device.

The problem is that avahi deamon gives me the ip address of the pi in the wlan if i do a nslookup from the laptop. This IP is of course not reachable for the laptop. For my understanding the avahi-deamon should either provide all IP addresses or only the one usable in the network where the request came from.

This is not a real big problem for now but it did pique my curiosity.

Regards
Aydan

User avatar
DougieLawson
Posts: 39303
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: avahi-daemon gives IP of wrong network

Mon Mar 10, 2014 7:39 pm

You'll need to add "allow-interfaces=" & "deny-interfaces=" directives to your avahi configuration.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Aydan
Posts: 729
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, near Lake Constance

Re: avahi-daemon gives IP of wrong network

Mon Mar 10, 2014 8:29 pm

This won't allow me to run avahi on both interface separately, will it?
Is there a way to run two avahi-deamons, one for each network?

Regards
Aydan

User avatar
DougieLawson
Posts: 39303
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: avahi-daemon gives IP of wrong network

Mon Mar 10, 2014 8:46 pm

Aydan wrote:This won't allow me to run avahi on both interface separately, will it?
Is there a way to run two avahi-deamons, one for each network?

Regards
Aydan
Hmmm, it may be possible. Two copies of the config file with allow and deny switched round.

You should be able to see what interface (UDP:5353) it's binding to with
sudo lsof -i UDP:5353
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Networking and servers”