7

I have a server running Debian 8. Recently I installed OpenVPN on it using this tutorial. Everything is working nicely. I tested on my macbook using the Tunnelblick client. Used Google to check my IP, connected to the VPN checked again and it changed to the same IP as my servers LAN. So I know that's all good.

My problem is that the File Shares on all the computers (all OSX's AFP protocol) on that LAN do not show up on my Finders sidebar while I'm connected through the VPN. Am able to connect to them manually using Finder's "Connect to Server" tool by connecting to afp://192.168.0.100 and that works nicely. So I'm assuming it's a problem with Bonjour.

From my research I've found out that Bonjour (mDNS) does not broadcast to different subnets. So I ran ifconfig on my macbook while connected through the VPN. it was 192.168.43.206. All of the computers on the network I'm connecting to are 192.168.0.10 to 192.168.0.200. So I'm guessing that's the source of my problem?

I think my solution might be to switch my OpenVPN config to "bridge" mode? I read some forums and articles which pointed to this as the solution, But I'm not even sure if I've diagnosed my problem correctly. And I haven't really grasped with Bridge mode setting.

Hoping someone can give me some clarity.

1
  • I had a similar issue with my RDP protocol. What I ended up doing was resubnetting my network so that everything was on the same network. That fixed my issue. I used the connection type that forwarded all Ethernet frames, not just the ip protocol. Hope this helps! Jan 16 '18 at 8:13
2

IIUC, the problem with mDNS/Bonjour is that it's implemented using the so-called multicasting, and multicast packets do not automatically crosss network boundaries (due to both the protocol's design and the design of Linux).

You might want to use something like smcroute to tunnel multicast traffic between all the networks your OpenVPN instance connects.

See this for more info, and this in general.

Another possibility is to switch OpenVPN from tun mode to tap. Unfortunately, this has its repercussions which must be considered thoroughly before implementing.

5
  • Thanks, It looks like smcroute can do what I want. as i've read up on vpn bridging and don't think I want that. but I don't think I have enough knowledge on networking to make it work. I think I want to connect my eth0 interface to the tun0. But the IP groups and whatnot have me lost. Jan 17 '18 at 14:56
  • Alright, looks like it's even worse (or better): the last message in this thread says that 1) it's apparently still impossible to route mdns's packets using a multicast router, but 2) avahi, the stock Linux mdns server, can work as a "repeater" for mdns packets.
    – kostix
    Jan 17 '18 at 20:45
  • 1
    Looks like it's the "reflector" mode — see this.
    – kostix
    Jan 18 '18 at 9:00
  • 1
    Ah cool! That might work well, I'm already running avahi on the same server that's hosting the VPN. I'm gonna read up on that and see if it works! Jan 18 '18 at 12:44
  • @tylermackenzie Did you ever figure this out?
    – slhck
    Mar 11 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.