Share Tethered connection to other devices

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?

TaSole

Posted 2016-07-03T05:51:45.740

Reputation: 27

Answers

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.

cybernard

Posted 2016-07-03T05:51:45.740

Reputation: 11 200