1

I would like beeing able to exchange packets between WIFI and LAN.

My Ubuntu 14.04 Server operated as a lan-wifi-router has two physical Ethernet Ports (p4p1 and p5p1) as well as a WIFI Module (wlan0). The p4p1 interface is my connection to the internet and gets its adress via DHCP from my provider.

wlan0 and p5p1 are connected to a bridge br0 which uses the static adress 192.168.3.1. Both indiviual interfaces have no adress. dnsmaq assignes each device at br0 to an ip adress. I used this guide to set up my router.

I'm able to reach the internet from both LAN and WIFI. It is also possible to ping each device from the servers console. But i am not able to connect from one part of the network to another. Hence, my WIFI printer can only be operated by the server and not by the clients.

I can confirm that packets are sent and reach the bridge br0, but they fail to reach the interface after the bridge. This has been tested with wireshark.

Configuration:

/etc/networking/interfaces

auto lo
iface lo inet loopback

auto p4p1
iface p4p1 inet dhcp

auto br0
iface br0 inet static
    address 192.168.3.1
    netmask 255.255.255.0
    broadcast 192.168.3.255
    bridge_ports p5p1 wlan0             

route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         XXX.XXX.XXX.1   0.0.0.0         UG    0      0        0 p4p1
XXX.XXX.XXX.0   0.0.0.0         255.255.255.0   U     0      0        0 p4p1
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 br0

Is there any obvious fault? Maybe in the routing table?

Edit 1: I already had this line in /etc/sysctl.conf uncommented.

net.ipv4.ip_forward=1

Hence, the solution from darent did not work.

Edit 2: Has anyone an idea why the third line of the routing table has the gateway 0.0.0.0? May this be the source of the problem? Shouldn't this be 192.168.3.1?

Edit 3: I simplified my /etc/networking/interfaces file.

Edit 4: As i'm still trying to handle this problem, here is my

iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
fail2ban-ssh  tcp  --  anywhere             anywhere             multiport dports ssh

Chain FORWARD (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere             LOG level warning

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain fail2ban-ssh (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere
0

Is the server configured to forward the packages it receives? Try this:

sudo sysctl net/ipv4/ip_forward=1
  • 1
    Yes i tried it, but the problem still occours. I also edited my initial question. – Harald Thomson Sep 15 '14 at 15:45
0

I found die source of the problem. My iptables FORWARD chain had the policy "DROP" adopted.

I needed a redesign of my iptables rules. But I basically did a

iptables --policy FORWARD ACCEPT

and it worked like a charm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.