![]() You have to configure the DHCP server on the local WiFi router to give the ip address 192.168.50.2 to all clients as internet router ip address (default gateway). The last step now is to tell all clients on your local network that the internet router is the RasPi. Execute this command: rpi ~$ sudo iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE We do it with a NAT (Network Address Translation). Now you have to fake the modem to tell it that all data packages are comming from the RasPi and not from the underlaying local network. ![]() Or with systemd-networkd you can add IPForward=yes to the section in one of your /etc/systemd/network/*.network files. Or you can uncomment this in /etc/nf and reboot: # Uncomment the next line to enable packet forwarding for IPv4 You can enable it direct to the kernel with: rpi ~$ echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward ![]() I don't know what configuration you are using. To enable this you have to turn on ip forwarding. Now you have to enable routing so that data packages are transmitted between the both interfaces. The ip addresses should be on different subnets, for example eth0 with 192.168.50.2 and ppp0 with 10.1.1.180. You should have both interfaces available each with its own ip address. ![]() Local WiFi-router (eth0)RPi(ppp0) modem INTERNET To eth0 you have to give a static ip address. I assume the RasPi is connected to the internet with interface ppp0 and get the ip address for it from the USB data modem.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |