This is my current configuration: enter image description here

My devices need to configure the proxy settings in order to access the internet. What I want to do is configure the raspberry pi as a default gateway with ip for the other devices in my subnet. Then the raspberry pi forwards all traffic through the proxy server on port 8080 through the wlan0 interface. How can I do that?

  • If you want to use the Raspberry Pi as gateway you do not need the router anymore. Do you want to remove the router? – Ingo Nov 6 '19 at 18:32
  • @Ingo i cant remove the router because the mac address of it is already registered on the other end. Plugging the pi on the wan port will shut down my connection – Sebastian Ampuero Morisaki Nov 6 '19 at 19:08
  • You can give the RasPi any mac address you want. – Ingo Nov 6 '19 at 20:10

I cannot see how it could work with the connections in your drawing. The main problem is that you have one broadcast domain (all interfaces on all devices are on the same subnet so you cannot route traffic on the RasPi.

You can only route traffic on the router because it is the only one that is connected to two different subnets. On the RasPi you only have two interfaces connected to the same remote device (router). The kernel can use only one connection but it can switch to the other interface if one fails. It is a failover scenario but cannot be used to route traffic through wlan0, through the router, to the proxy server.

The simplest solution I see so far is to remove the router and connect the RasPi direct to the proxy server.

There may be others possible if you have a managed router that can handle VLANs or sophisticated policy routing. But if you have that then you don't need an additional RasPi.

| 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.