Share internet from wifi to ethernet

Hello all,

I’m new to volumio and I have a project of Car system. I’am french so… sorry for my syntax or lack of vocabulary.

this topic is not about talking of my project but because I have a problem.

I want to use my phone to bring internet connexion to volumio on rpi but I want to share this connexion by ethernet to a second board computer (rpi or most probably odroid UX4 with lineage).

I tried the first answer on this : raspberrypi.stackexchange.com/q … ernet-port

The howto for Jessy didn’t worked for me.
The one for Stretch, if I manually run the batch file, give me an IP address on Pi plugged by ethernet on volumio rpi, but no internet connexion and anyway, after reboot no IP adress anymore.

On boot, I run the batch file, in /etc/rc.local witch is different that advised but the folder .config does not exist.

I suppose that volumio has it’s own process for managing network and maybe is in conflict with my need.

How can I do that ?

Thanks !

You probably should have a search for ‘systemd’ service files to achieve what you want. If you really want to use rc.local then there are workarounds available, for example have a look here.

Thanks for your Help !

I’ve done a systemd script like this example unix.stackexchange.com/question … or-systemd
with this script : github.com/arpitjindal97/raspbi … h-route.sh

Now I think something happen because i’ve lost my web access to volumio.local. :confused:
see screenshot.
It’s seems to have a config conflict.

Maybe I have to search in volumio scripts ? I prefer not but if I must do it…

Capture d’écran 2017-12-21 à 09.42.39.png

From your link, you’re installing dnsmasq (?) which is maybe conflicting with Volumio’s use of dhcpcd. Can you not also use dhcpcd to achieve your aim without installing the extra dnsmasq?

By the way, I notice that Volumio is already running a systemd service to maintain compatibility with rc.local.

You’re right.

But in fact, after a fresh install of volumio on SD, there are the same errors for dhcpcd.service dhcpd.service and hotspot.service!?!

I’m using the last release 2.344
The only things I’ve done after fresh install is booting, connect to wifi hotspot, configure my wifi network, connect by volumio.local/dev to enable ssh, connect by ssh, launch systemctl command.

install was done with RJ45 plugged… maybe that ?

I vill try to reinstall volumio without RJ45 plugged but with very few hope.

They could well be failing because: (a) you are not using the hotspot, and consequently (b) you don’t need a dhcp server.

Edit: yes just checked, both of those services have “failed” on one of my working systems

I 've tried several times, some solutions with dhcpcd, dnsmasq, etc.
I have an IP adress by eth0 but no internet.

I think the issue is on IP tables routes. maybe another script from volumio breaks mine.

If a volumio dev can read that and tells me if I’m wrong and where to search…

I think also than the “failed” status see above is not a normal way to stop or idle a service maybe it’s a bug too.

thanks for help

ok success with isc-dhcp-server by using this :
itfanatic.com/?q=node/84

BUT : after reboot, no more “failed” for dhcpcd and…of course conflict with isc-dhcp-server.

I think dhcpcd have a wrong config in volumio image.
working on configuring isc-dhcp-server resolved the dhcpcd service problem. (using /etc/network/interfaces)

now trying to configure dhcpcd without isc-dhcp-server but don’t really know it.

I struggled over the same “problem” and like to share my solution.

What i try:
I have many volumio’s (raspberry pi) in my house connected via LAN and like to use them as a “wifi range extender”. So i like to connect to hotspot and have internet.

This works not “out of the box”.
You need this steps (over ssh):

  1. Enable broadcast and DNS
    sudo nano /etc/dhcp/dhcpd.conf
    Add this option:
    option broadcast-address 192.168.211.255;
    Edit this option:
    option domain-name-servers 8.8.8.8, 8.8.4.4;

  2. Enable Routing
    sudo nano /etc/sysctl.conf
    Remove the # bevor the entry “net.ipv4.ip_forward=1”

  3. Enable Masqerading
    Hint: sleep 10 is needed, otherwise after a reboot website is not reachable, i don’t know why!
    sudo nano /etc/rc.local
    Add this line:
    sleep 10
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Reboot

Edit2:
How to bind “upmpdcli” to eth0 AND wlan0?!
Need help! :confused:
Edit3:
I am not the only one -> 001-upnp-mpd-android-control-volume-t4967.html#p58412