Поднять мобильный socks5 прокси на linux, используя 4g модем
11 USDПриветствую, буду краток.
Система linux ubuntu, необходимо поднять socks5 мобильный прокси, можно использовать Dante или что угодно. Система чистая, установлен только teamviewer для подключения.
Есть 2 интернет подключения:
ens18 - локальная сеть
enx344b50000000 - 4g usb модем
Необходимо чтобы основным подключением в системе оставался ens18, на его локальной сеть, по порту 1080, необходимо запустить прокси socks5, который будет использовать интернет соединения enx344b50000000, для выхода в сеть.
192.168.0.108:1080 -> 192.168.1.199
Есть проблема, что просто так это не получиться запустить прокси, необходимо настроить "policy based routing" (это как я думаю), может что-то ещё.
Если просто включить прокси и перенаправить его в модем, то не будут загружаться сайты, кроме админки модема по 192.168.1.55
Ссылки которые могут помочь:
https://www.linux.org.ru/forum/admin/15645306
https://www.linux.org.ru/forum/admin/15644745
https://forum.ubuntu.ru/index.php?topic=298689.0
Понятное дело, после перезагрузки все параметры и политики должны быть подгружены автоматически.
Подключение по teamviewer, после проверки работоспособности нужно либо скинуть конфиги и команды (может что-то ещё), чтоб я в будущем, после переустановки системы, смог повторить эти действия сам.
mykyta@localserver:~$ ip route
default via 192.168.0.1 dev ens18 proto dhcp src 192.168.0.108 metric 100
default via 192.168.1.55 dev enx344b50000000 proto static metric 101
192.168.0.0/24 dev ens18 proto kernel scope link src 192.168.0.108 metric 100
192.168.1.0/24 dev enx344b50000000 proto kernel scope link src 192.168.1.199 metric 101
mykyta@localserver:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether bc:24:11:37:2e:3d brd ff:ff:ff:ff:ff:ff
altname enp0s18
inet 192.168.0.108/24 brd 192.168.0.255 scope global dynamic noprefixroute ens18
valid_lft 81805sec preferred_lft 81805sec
inet6 fe80::be24:11ff:fe37:2e3d/64 scope link
valid_lft forever preferred_lft forever
3: enx344b50000000: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 34:4b:50:00:00:00 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.199/24 brd 192.168.1.255 scope global noprefixroute enx344b50000000
valid_lft forever preferred_lft forever
inet6 fe80::8882:b46f:eb1e:a805/64 scope link noprefixroute
valid_lft forever preferred_lft forever
-
709 14 0 Hello Nikita.
Please write in private messages, for the amount of 500 UAH I can only provide consultation.
Based on what is written and the configs, do you understand what you want to do?
Best regards,
Andrey.
-
593 15 0 Hello, I am a DevOps and I can do this without any problems with full output.
But in Linux, there are nuances - you can leave the system accessible from the local network if accessed externally, but the outbound traffic must be routed through the second interface in any case, otherwise it will go through the default first one. By default, you can either use custom extensions with network namespaces where running a specific program should work, but I haven't done that (usually in large companies, the network is a bit different and there is no need to bother with this :)).
In any system configuration, you should have primary access to the virtual machine, unfortunately through a cumbersome process, so if something goes wrong, you may lose access to the system forever. There should be either a web console for the system or access through KVM to be able to change configurations if something stops working.
Current freelance projects in the category Linux & Unix
It is necessary to find the cause of periodic freezes of the Linux/PHP server of the online store.Looking for an experienced Linux System Administrator / DevOps to diagnose the causes of periodic crashes of the online store. It is necessary not to temporarily eliminate the symptoms, but to find the root cause of the problem, explain it, and propose an optimal solution.What… Linux & Unix, Software & Server Configuration ∙ 1 day 3 hours back ∙ 25 proposals |