Page 1 of 1

proxy ? to route based on URL

Posted: 2024-10-21 17:28
by atux_null
i am running Debian 12 and i have 2 ethernet interfaces:
enp6s10: 192.168.10.10/24 with gw: 192.168.10.1
enp6s20: 192.168.20.20/24 without gateway

behind each interface there is a DSL connection.
I would like to have a list of URLs that need to be routed through the 2nd interface that does not have a default gw.
i am thinking of a proxy, but i am not familiar with the config.

Re: proxy ? to route based on URL

Posted: 2024-10-21 19:08
by lindi
If you want to have two connections to internet, you need multiple routing tables. As far as I know, this is not supported by ifupdown, NetworkManager of systemd-networkd. This means you need to do quite a lot of manual configuration explained in https://tldp.org/HOWTO/Adv-Routing-HOWTO/

If somebody knows a network framework that supports multiple routing tables, let me know :)

After you have configured multiple routing tables you need configure your browser to use a proxy.pac file (proxy automatic configuration) that uses DIRECT by default and PROXY for specific URLs. That PROXY directive needs to point to localhost where you need to run some HTTP proxy program like squid and configure it to use the second internet connection.

Re: proxy ? to route based on URL

Posted: 2024-10-21 21:55
by Aki
atux_null wrote: 2024-10-21 17:28 i am running Debian 12 and i have 2 ethernet interfaces:
enp6s10: 192.168.10.10/24 with gw: 192.168.10.1
enp6s20: 192.168.20.20/24 without gateway

behind each interface there is a DSL connection.
I would like to have a list of URLs that need to be routed through the 2nd interface that does not have a default gw.
i am thinking of a proxy, but i am not familiar with the config.
Can you explain what you are really supposed to do?