I have Pidora (Fedora on a Raspberry Pi) that is currently acting as a Ethernet to WiFi "bridge".

I have dhcpd configured to hand out IPs in the range of -, netmask is This is configured against my Ethernet interface which has an IP of, which is the same as the dhcp router option.

I can see through arp that IPs are being handed out to devices.

I also has a wireless connection to my wireless router and I have configure it to obtain an address statically. The address is

I have changed the ipv4 to forward traffic and I have also used the following iptables to forward the traffic:

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  

I can now plug in any device to the Pis ethernet obtain an IP and connect to the outside internet via my wifi.

I can't however seem to ping (or do anything) to addresses on the ethernet interface. For example if I plug another computer into the ethernet and it gets assigned an address of say I can't ping form a device connected to my wireless that has an address like

Any help is greatly appreciated. :-)

  • 1
    you may simply use the network-manager to edit the ethernet connection , in ipv4 tab just change the "method" to "shared to other computers", – Jonah May 21 '17 at 22:11
  • the network-manager will automatically chose the better settings for you , also Note that dhcp server should be disabled in the bridgedRouter in order to have a working shared connection! – Jonah May 21 '17 at 22:22
  • Your wireless device needs to know that address is beyond the pi gateway address So it needs something like ip route add via Also, ping uses protocol icmp so you need an explicit iptables -A FORWARD -p icmp -j ACCEPT. Or if you have a secure network change the default policy from DROP to ACCEPT. – meuh May 22 '17 at 9:22
  • You are masquerading traffic, you are not bridging it. So wlan and ethernet must be different segments. Assuming that your WLAN segment is a /24, you need netmasks on both, then on ethernet and on WLAN will be separate. – dirkt May 22 '17 at 9:37
  • Thanks for the comments so far. I am masquerading the traffic in order to grant devices connected via ethernet access to the wider world via the wireless adapter that gets an IP address from my home router. What I really want to do is have a network on eth0 and get an IP on wlan0 (from my home router) and be able to access any device connected to the eth0 whilst having this device be able to connect to the internet. Is this possible? – J.Evs May 22 '17 at 21:53

I would like to thank everyone for their comments and putting me on the right path.

In the end I have logged onto my router and updated the routing section giving it the IP range I want to reach and the range of IP addresses that may be assigned to devices on that network.

| improve this answer | |

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.