I was wondering, is it possible to have ip forwarding on my pi enabled(e.g. follow this to configure it --> http://www.ducea.com/2006/08/01/how-to-enable-ip-forwarding-in-linux/) and at the same time expect that it can also be used e.g. to serve dns queries(e.g. running dnsmasq) ?

Thanks in advance, Vincent

  • Note that I only use the eth interface.
    – vincent
    Sep 17, 2016 at 21:20

1 Answer 1


There is no problem using any Linux host (pi included) as both server and router. As long as there's not some port 53 port forward, it'll serve on your pi's ip just fine.

You should probably understand, however, that routing usually makes sense only when more than one interface is involved. This can be two Ethernet NICs, an Ethernet and a wireless, or some combination of those and a virtual interface like a VPN, VLAN, or similar (or really, any combination of any of these). And forwarding is not the same as connection sharing (related, but different). Plus the hosts intending to use your device as a router will need routing updated to use it (e.g. by using it as their default gateway or similar).

In short, there's way more to making routing useful than what's in the linked guide. So be careful and have fun learning how all this works!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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