Skip to main content

Ok. I was able to get it to work.

Things to note:

  • With current version of Raspbian (JESSE/LITE), the use of /etc/network/interfaces is obsolete. But keep it as it is used by if-up and if-down scripts.

My Setup

  • Gave Raspberry Pi's eth0 a static IP address, connected to router's WAN port.
  • Gave router a static IP address on the same network with the Raspberry Pi as the gateway.
  • Installed dnsmasq [sudo apt-get install dnsmasq] on the Raspberry Pi.
  • Configured packet forwarding [net.ipv4.ip_forward = 1] in /etc/sysctl.conf
  • Configured routing using iptables
  • sudo iptables -t nat -A POSTROUTING -o usb0 -s 192.168.2.0/24 -j MASQUERADE. usb0 is the source interface. One can add a post-up script in /etc/network/interfaces to automate this.

Configuring the static IP address static in /etc/dhcpcd.conf

interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

Ok. I was able to get it to work.

Things to note:

  • With current version of Raspbian (JESSE/LITE), the use of /etc/network/interfaces is obsolete. But keep it as it is used by if-up and if-down scripts.

My Setup

  • Gave Raspberry Pi's eth0 a static IP address, connected to router's WAN port.
  • Gave router a static IP address on the same network with the Raspberry Pi as the gateway.
  • Installed dnsmasq [sudo apt-get dnsmasq] on the Raspberry Pi.
  • Configured packet forwarding [net.ipv4.ip_forward = 1] in /etc/sysctl.conf
  • Configured routing using iptables
  • sudo iptables -t nat -A POSTROUTING -o usb0 -s 192.168.2.0/24 -j MASQUERADE. usb0 is the source interface. One can add a post-up script in /etc/network/interfaces to automate this.

Configuring the static IP address static in /etc/dhcpcd.conf

interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

Ok. I was able to get it to work.

Things to note:

  • With current version of Raspbian (JESSE/LITE), the use of /etc/network/interfaces is obsolete. But keep it as it is used by if-up and if-down scripts.

My Setup

  • Gave Raspberry Pi's eth0 a static IP address, connected to router's WAN port.
  • Gave router a static IP address on the same network with the Raspberry Pi as the gateway.
  • Installed dnsmasq [sudo apt-get install dnsmasq] on the Raspberry Pi.
  • Configured packet forwarding [net.ipv4.ip_forward = 1] in /etc/sysctl.conf
  • Configured routing using iptables
  • sudo iptables -t nat -A POSTROUTING -o usb0 -s 192.168.2.0/24 -j MASQUERADE. usb0 is the source interface. One can add a post-up script in /etc/network/interfaces to automate this.

Configuring the static IP address static in /etc/dhcpcd.conf

interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
Added detailed steps.
Source Link
chx101
  • 171
  • 1
  • 7

Ok. I was able to get it to work.

Here's what I didThings to note:

  • With current version of Raspbian (JESSE/LITE), the use of /etc/network/interfaces is obsolete. But keep it as it is used by if-up and if-down scripts.

My Setup

  • Gave Raspberry Pi's eth0 a static IP address, connected to router's WAN port.
  • Gave router a static IP address on the same network with the Raspberry Pi as the gateway.
  • Installed dnsmasq [sudo apt-get dnsmasq] on the Raspberry Pi.
  • Configured packet forwarding [net.ipv4.ip_forward = 1] in /etc/sysctl.conf
  • Configured routing using iptables
  • sudo iptables -t nat -A POSTROUTING -o usb0 -s 192.168.2.0/24 -j MASQUERADE. usb0 is the source interface. One can add a post-up script in /etc/network/interfaces to automate this.

Configuring the static IP address static in /etc/network/interfacesdhcpcd.conf

auto lo    
iface lo inet loopback 
ifaceinterface eth0 inet manual    
auto wlan0 
iface wlan0 inet manual

        auto br0 
        iface br0 inet static
        address 10ip_address=192.1168.10.1310/24
        gatewaystatic 10routers=192.1168.10.1
        netmaskstatic 255.255domain_name_servers=192.255168.0
        bridge-ports wlan0 eth0
        bridge-stp off
        bridge-fd 0
        bridge-waitport 0

auto usb0
       post-up /home/pi/restart_bridge

/home/pi/restart_bridge

ifdown br0
ifup br0.1

The raspberry PI's eth0 is connected to the router's WAN and the latter gets its WAN IP address from the phone.

I confirmed all clients connected to the router can talk to each other and have internet connection.

Ok. I was able to get it to work.

Here's what I did:

/etc/network/interfaces

auto lo    
iface lo inet loopback 
iface eth0 inet manual    
auto wlan0 
iface wlan0 inet manual

        auto br0 
        iface br0 inet static
        address 10.1.1.13
        gateway 10.1.1.1
        netmask 255.255.255.0
        bridge-ports wlan0 eth0
        bridge-stp off
        bridge-fd 0
        bridge-waitport 0

auto usb0
       post-up /home/pi/restart_bridge

/home/pi/restart_bridge

ifdown br0
ifup br0

The raspberry PI's eth0 is connected to the router's WAN and the latter gets its WAN IP address from the phone.

I confirmed all clients connected to the router can talk to each other and have internet connection.

Ok. I was able to get it to work.

Things to note:

  • With current version of Raspbian (JESSE/LITE), the use of /etc/network/interfaces is obsolete. But keep it as it is used by if-up and if-down scripts.

My Setup

  • Gave Raspberry Pi's eth0 a static IP address, connected to router's WAN port.
  • Gave router a static IP address on the same network with the Raspberry Pi as the gateway.
  • Installed dnsmasq [sudo apt-get dnsmasq] on the Raspberry Pi.
  • Configured packet forwarding [net.ipv4.ip_forward = 1] in /etc/sysctl.conf
  • Configured routing using iptables
  • sudo iptables -t nat -A POSTROUTING -o usb0 -s 192.168.2.0/24 -j MASQUERADE. usb0 is the source interface. One can add a post-up script in /etc/network/interfaces to automate this.

Configuring the static IP address static in /etc/dhcpcd.conf

interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
added 22 characters in body
Source Link
chx101
  • 171
  • 1
  • 7

Ok. I was able to get it to work.

Here's what I did:

/etc/network/interfaces

auto lo    
iface lo inet loopback 
iface eth0 inet manual    
auto wlan0 
iface wlan0 inet manual

        auto br0 
        iface br0 inet static
        address 10.1.1.13
        gateway 10.1.1.1
        netmask 255.255.255.0
        bridge-ports wlan0 eth0
        bridge-stp off
        bridge-fd 0
        bridge-waitport 0

auto usb0
       post-up /home/pi/restart_bridge

/home/pi/restart_bridge

ifdown br0
ifup br0

The raspberry PI's eth0 is connected to the router's WAN and the latter gets its WAN IP address from the phone.

I confirmed all clients connected to the router can talk to each other and have internet connection.

Ok. I was able to get it to work.

Here's what I did:

/etc/network/interfaces

auto lo    
iface lo inet loopback 
iface eth0 inet manual    
auto wlan0 
iface wlan0 inet manual

auto br0 iface br0 inet static
        address 10.1.1.13
        gateway 10.1.1.1
        netmask 255.255.255.0
        bridge-ports wlan0 eth0
        bridge-stp off
        bridge-fd 0
        bridge-waitport 0

auto usb0
       post-up /home/pi/restart_bridge

/home/pi/restart_bridge

ifdown br0
ifup br0

The raspberry PI's eth0 is connected to the router's WAN and the latter gets its WAN IP address from the phone.

I confirmed all clients connected to the router can talk to each other and have internet connection.

Ok. I was able to get it to work.

Here's what I did:

/etc/network/interfaces

auto lo    
iface lo inet loopback 
iface eth0 inet manual    
auto wlan0 
iface wlan0 inet manual

        auto br0 
        iface br0 inet static
        address 10.1.1.13
        gateway 10.1.1.1
        netmask 255.255.255.0
        bridge-ports wlan0 eth0
        bridge-stp off
        bridge-fd 0
        bridge-waitport 0

auto usb0
       post-up /home/pi/restart_bridge

/home/pi/restart_bridge

ifdown br0
ifup br0

The raspberry PI's eth0 is connected to the router's WAN and the latter gets its WAN IP address from the phone.

I confirmed all clients connected to the router can talk to each other and have internet connection.

added 12 characters in body
Source Link
chx101
  • 171
  • 1
  • 7
Loading
Source Link
chx101
  • 171
  • 1
  • 7
Loading