Zdravím pani ,
skúsil som ten bridge a tam som aj stroskotal
môj postup bol nasledovní :
- OS raspbian PI
- sudo apt-get update
- sudo apt-get upgrade
- sudo rpi-update
- sudo apt-get bridge-utils
editoval som - /etc/network/interfaces
# interfaces(5) file used by ifup(
and ifdown(
# Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet manual
#allow-hotplug wlan0
auto wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
#Most wlan0 to eth0
auto br0
iface br0 inet dhcp
bridge_ports wlan0 eth0
bridge_stp off
bridge_fd 0
bridge_waitport 0
wpa-iface wlan0
wpa-bridge br0
wpa-driver wext
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
---------------------------------------------------
ďalej som editoval /etc/sysctl.conf
a povolil
net.ipv4.ip_forward=1
Cez terminal nahodil:
sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
sudo iptables -A FORWARD --in-interface eth0 -j ACCEPT
sudo iptables -F
sudo iptables -t nat -F
sudo iptables -t mangle -F
sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
sudo iptables -A FORWARD -i wlan0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT
a výsledok je takýto:
br0 Link encap:Ethernet HWadr b8:27:eb:6f:ee:3c
inet6-adr: fe80::ba27:ebff:fe6f:ee3c/64 Rozsah:Linka
AKTIVOVÁNO VŠESMĚROVÉ_VYSÍLÁNÍ MULTICAST MTU:1500 Metrika:1
RX packets:7 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
kolizí:0 délka odchozí fronty:1000
RX bytes:2201 (2.1 KiB) TX bytes:6444 (6.2 KiB)
eth0 Link encap:Ethernet HWadr b8:27:eb:6f:ee:3c
inet adr:169.254.50.108 Všesměr:169.254.255.255 Maska:255.255.0.0
AKTIVOVÁNO VŠESMĚROVÉ_VYSÍLÁNÍ BĚŽÍ MULTICAST MTU:1500 Metrika:1
RX packets:7 errors:0 dropped:0 overruns:0 frame:0
TX packets:65 errors:0 dropped:0 overruns:0 carrier:0
kolizí:0 délka odchozí fronty:1000
RX bytes:2201 (2.1 KiB) TX bytes:13958 (13.6 KiB)
lo Link encap:Místní smyčka
inet adr:127.0.0.1 Maska:255.0.0.0
inet6-adr: ::1/128 Rozsah:Počítač
AKTIVOVÁNO SMYČKA BĚŽÍ MTU:65536 Metrika:1
RX packets:136 errors:0 dropped:0 overruns:0 frame:0
TX packets:136 errors:0 dropped:0 overruns:0 carrier:0
kolizí:0 délka odchozí fronty:1
RX bytes:11472 (11.2 KiB) TX bytes:11472 (11.2 KiB)
wlan0 Link encap:Ethernet HWadr b8:27:eb:3a:bb:69
inet adr:192.168.1.12 Všesměr:192.168.1.255 Maska:255.255.255.0
AKTIVOVÁNO VŠESMĚROVÉ_VYSÍLÁNÍ BĚŽÍ MULTICAST MTU:1500 Metrika:1
RX packets:244 errors:0 dropped:158 overruns:0 frame:0
TX packets:75 errors:0 dropped:0 overruns:0 carrier:0
kolizí:0 délka odchozí fronty:1000
RX bytes:29706 (29.0 KiB) TX bytes:11411 (11.1 KiB)
doplnok
pi@raspberrypi:~ $ brctl show
bridge name bridge id STP enabled interfaces
br0 8000.b827eb6fee3c no eth0
pi@raspberrypi:~ $
neviem prísť na to kde je chyba ....