I want to set up my RPi3 to be a 1-port router running a webserver.

I know how to make a wireless access point and connect my PC via hostapd/dnsmasq, and I know how to set up a webserver on the Pi.

However, I want to do it WITHOUT wireless. I want to plug my PC's ethernet cable into the single port on the RPi. That's all. No internet.

So I guess I need the Pi to be the world's lamest router: one port and no WAN.

Can someone help direct me with keywords or topics I should google? I'm not entirely sure what I'm trying to do or what it is called. Googling for "make my rpi a router" turns up thousands of wifi posts and no wired tutorials.


EDIT: Ok, so let's set this up.

Using Raspbian V10. So /etc/networks/interfaces should be....

auto eth0
iface eth0 inet static

How do I tell eth0 to "be a server"? Is there a good book / website for this?

1 Answer 1


What should that be: a one port router? A Router is defined to route traffic between at least two interfaces. You may have one port but to route traffic you need two (or more) interfaces on this port, maybe VLAN interfaces or a VPN tun0 interface together with eth0 or something like this.

But from you description I cannot see any need for a router. You do not want wireless, means no access point. I don't understand why you mention hostapd/dnsmasq. You just want to use the wired port with one interface eth0. So just configure this single interface maybe with a static ip address and with a dhcp server enabled, because it is used as a server.

  • so would i configure /etc/network/interfaces with "iface eth0 inet static ... address gateway ... " that's where i get stuck. in order for the pi to act as a server, what are the basic components it needs? It needs its own static IP, and it needs to know how to assign IPs to whatever plugs into eth0... what else?
    – Freeman
    Commented Sep 7, 2019 at 18:37
  • @PeterT You have given additional important information about your configuration. Please edit your question and add it there. You are still using network/interfaces. That's deprecated on Raspbian. What operating system do you use?
    – Ingo
    Commented Sep 7, 2019 at 22:01

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.