Config as "ordinary" PC

I have an X86 system with 3 ethernet ports. Is it possible to disable the router functionality and have all the default networking of a PC? So in eth0 configure IP, subnet, GW and be able to access the Internet as a PC and also be able to access this system from other systems from the LAN?
i am running Openwrt 23.05.02

Describe what you mean by the phrase "all the default networking of a PC"?

Here how to disable the IP Forwarding (routing) functionally:

# add to /etc/sysctl.conf

net.ipv4.ip_forward=0
net.ipv6.conf.all.forwarding=0

Just FYI - if configured properly, it doesn't matter if you enabled or disabled IP Forwarding (routing) on a "ordinary PC". This setting is available on any Linux machine.

eth0 should already be set as LAN with an IP of 192.168.1.1. Maybe you should explain the issues you're having.

Just to be clear - if you want to run an ordinary PC, I would suggest an ordinary PC distribution of Linux.

Just curious -- why would you want to do this when there are 100 other flavors of fully-featured, ready-to-download-and-install Linux to meet any use-case you could possibly imagine, desktop, server, research, security, development, etc.?

2 Likes

Yes, of course! You just have a "device" with three ethernet connections; now you decide how is each connection configured (DHCP server, DHCP client, PPPoE client, ...), and how/if the network traffic flows among the interfaces.

2 Likes

Can you define an "ordinary PC" as it relates to how you intend to use the system?

Yes, no issue here. In fact, the networking capabilities will likely be more advanced and flexible that most ordinary PCs (at least with their default networking use-case assumptions).

OpenWrt is highly optimized as a router OS, so networking is excellent and easy.

The flip side of that is that it's not designed as a general purpose OS. It does not have any graphics capabilities (aside from text mode) and is generally built to be as lean/lightweight as possible to run on devices with really limited hardware resources. So you're not going to be browsing the web with this thing, or really doing anything that requires a desktop-class OS; but if you're text based and have some basic services to run, OpenWrt could probably do what you want.

2 Likes

An ordinary PC (in default "obtain IP address automatically" configuration) uses DHCP client on its Ethernet port. This is proto dhcp in OpenWrt. You will then have a simple routing table where the router that the network advertises on DHCP is the default route.

Be sure to shut down the DHCP server in OpenWrt as it is not needed and it can serve incorrect information to other LAN devices. Although I think that later versions are smart enough not to do that now, it's always a good idea to click over to the DHCP tab and choose disabled, also do that for DHCPv6 and RA on the IPv6 tab.

2 Likes