Consider a small network with 1 router (192.168.1.1) and clients (192.168.1.x). The router (OpenWRT) provides Ethernet LAN and WiFi for the clients, to connect to the Internet.
Now, I want to use a server in between the clients and the router. So that the clients first connect logically to the server and the server routes all the traffic from the connected clients to the router. All clients and also the Server are only connect to the router. The server does only have 1 eth0 interface.
[Clients]----[Server]----[Router]----[Internet]
How do I configure this setup? I also want only some specific clients to use the server in between themself and the router. All the rest of the clients should not use the server as a "gateway" or "tunnel".
Is it possible for example to use the server's IP as the default gateway in the IP settings of the client(s). And configure the server to just accept all incoming traffic from the clients and route it to the router?
Edit: How to set this up? I cant find any tutorials for this.