Can I use RPi as Internet Gateway/Bridge, with the possibility to control the network bandwidth depending upon local IP?
I would like to setup as follows, and I tried the tutorial at http://raspberrypihq.com/how-to-turn-a-raspberry-pi-into-a-wifi-router/ making some modifications, but still no luck.
The RPi recognized the Ethernet port as "eth0" and the USB port connected to Router(with Internet) as eth1, so I setup only the NAT Bridge and DHCP server and also replaced every occurrence in the tutorial as follows,
wlan0 => eth0 eth0 => eth1 "ifconfig" returned,
eth0 Link encap:Ethernet HWaddr b8:27:eb:51:f6:23 inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3278 errors:0 dropped:0 overruns:0 frame:0 TX packets:868 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:407583 (398.0 KiB) TX bytes:205809 (200.9 KiB) eth1 Link encap:Ethernet HWaddr 00:0f:a3:51:38:a6 inet addr:192.168.1.10 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6702 errors:0 dropped:0 overruns:0 frame:0 TX packets:6471 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1110986 (1.0 MiB) TX bytes:1411501 (1.3 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:18 errors:0 dropped:0 overruns:0 frame:0 TX packets:18 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1872 (1.8 KiB) TX bytes:1872 (1.8 KiB) "/etc/network/interfaces/" has the configuration as follows,
auto lo iface lo inet loopback iface eth0 inet static address 192.168.0.1 netmask 255.255.255.0 network 192.168.0.1 broadcast 192.168.0.255 gateway 192.168.0.1 iface eth1 inet static address 192.168.1.10 netmask 255.255.255.0 network 192.168.1.1 broadcast 192.168.0.255 gateway 192.168.1.1 allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp Pinging returned,
PING google.com (216.58.197.46) 56(84) bytes of data. From 192.168.0.1 icmp_seq=1 Destination Host Unreachable From 192.168.0.1 icmp_seq=2 Destination Host Unreachable From 192.168.0.1 icmp_seq=3 Destination Host Unreachable ^C --- google.com ping statistics --- 5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4113ms pipe 3 RPi is trying to access the internet from its Ethernet port(eth0), but the internet is actually on USB port(eth1).
Any suggestions ?
