proxy ? to route based on URL

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
atux_null
Posts: 14
Joined: 2017-10-28 14:57

proxy ? to route based on URL

#1 Post 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.

lindi
Debian Developer
Debian Developer
Posts: 571
Joined: 2022-07-12 14:10
Has thanked: 2 times
Been thanked: 114 times

Re: proxy ? to route based on URL

#2 Post 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.

Aki
Global Moderator
Global Moderator
Posts: 3950
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 109 times
Been thanked: 518 times

Re: proxy ? to route based on URL

#3 Post 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?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply