[root@media ~]# cat /proc/sys/net/ipv4/ip_forward
1
oj wrote:Are you using brctl? Do you have ebtables installed?
[root@media ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:12:3F:F2:31:65
inet addr:192.168.0.7 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::212:3fff:fef2:3165/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:102 errors:0 dropped:0 overruns:0 frame:0
TX packets:135 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12230 (11.9 KiB) TX bytes:18892 (18.4 KiB)
Interrupt:16
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:840 (840.0 b) TX bytes:840 (840.0 b)
wlan0 Link encap:Ethernet HWaddr 00:14:A5:04:94:3C
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
[root@media ~]# brctl show
bridge name bridge id STP enabled interfaces
[root@media ~]# brctl addbr br0
[root@media ~]# ifconfig br0 up
[root@media ~]# ifconfig
br0 Link encap:Ethernet HWaddr F6:1C:34:F5:5B:0E
inet6 addr: fe80::f41c:34ff:fef5:5b0e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:398 (398.0 b)
eth0 Link encap:Ethernet HWaddr 00:12:3F:F2:31:65
inet addr:192.168.0.7 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::212:3fff:fef2:3165/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:466 errors:0 dropped:0 overruns:0 frame:0
TX packets:425 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:47705 (46.5 KiB) TX bytes:57848 (56.4 KiB)
Interrupt:16
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:62 errors:0 dropped:0 overruns:0 frame:0
TX packets:62 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5355 (5.2 KiB) TX bytes:5355 (5.2 KiB)
wlan0 Link encap:Ethernet HWaddr 00:14:A5:04:94:3C
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
[root@media ~]# ifconfig br0
br0 Link encap:Ethernet HWaddr F6:1C:34:F5:5B:0E
inet6 addr: fe80::f41c:34ff:fef5:5b0e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:468 (468.0 b)
[root@media ~]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000000000000 no
[root@media ~]# brctl addif br0 eth0
doktor5000 wrote:The simplest solution would be to tell iptables to masquerade packages for that subnet, no?
Check http://www.billauer.co.il/ipmasq-html.html or http://www.ibiblio.org/pub/linux/docs/h ... HOWTO.html
oj wrote:Are you using brctl? Do you have ebtables installed?
sudo iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -j SNAT --to-source 192.168.0.7
mackowiakp wrote:Yep. But I want to bridge traffic, not routing. The code You sent me is about routing/firewalling IP traffic.
And the problem is, that adding single (wired) ethernet interface as the only to new created bridge, hangs ANY trafic on this interface at all. It is not iptables or any other firewall issue. In my meaning it is a bug in brctl and bridge-utils.
ifconfig eth0 down
ifconfig wlan0 down
brctl addbr br0
brctl addif br0 eth0, wlan0
ifconfig eth0 up
ifconfig wlan0 up
ifconfig br0 192.168.0.7/24
ifconfig br0:1 192.168.10.2/24 (use proper wlan0 address here)
Users browsing this forum: No registered users and 1 guest