0

What I want to do is the following: Tether my android device's internet connection to a Raspberry Pi (USB cable). Then via ethernet cable connect the Raspberry to a router. Other devices are then connected to the router for internet connection. How do I do this?

1

connect Raspberry PI to wifi with standard tools

echo 1>net.ipv4.conf.all.forwarding = 1

Pick a private ip range like 192.168.0.1 set the lan IP address. configure the dhcp server.

subnet 192.168.0.0 netmask 255.255.255.0 {

  option routers 192.168.0.1;
  option domain-name-servers 192.168.0.1;
  option broadcast-address 192.168.0.255;
  authoritative ;
  range 192.168.3.2 192.168.3.255;
  default-lease-time 14400;
  max-lease-time 172800;
}

save and exit go into named.conf find allow-query { 127.0.0.1;}; change by adding 192.168.0.1/24; after 127.0.0.1 save and exit restart dhcp server and named serivce, and it should work.

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.