korsunav / mikrotik-wireguard-vless

Selective URL redirection via VLESS in the network on Mikrotik without the ability to use containers
8 stars 3 forks source link

Transparent Proxy/System Proxy Implementation #2

Open dominikes opened 1 week ago

dominikes commented 1 week ago

Transparent Proxy/System Proxy Implementation: redirect I can't get traffik in this configuration, only if it's like this: Transparent Proxy/System Proxy Implementation: tproxy Is this wrong? What could be the error?

korsunav commented 1 week ago

Are you using Oracle Linux as host system? Is it clean installation? SELinux and FirewallD disabled? Docker compose files are like in repository or have some modifications?

dominikes commented 1 week ago

Thanks for the feedback I use Ubuntu 22 Linux, Is it clean installation, SELinux and FirewallD disabled, I used the docker compose files from your example

korsunav commented 1 week ago

Ubuntu use UFW instead of FirewallD. Ensure that UFW is inactive. Also if you use nftable in your Ubuntu installation it needs right configurate variables: V2RAYA_NFTABLES_SUPPORT IPTABLES_MODE

https://v2raya.org/en/docs/prologue/installation/docker/

dominikes commented 1 week ago

Снимок экрана 2024-10-06 в 13 21 24 as I understand all the rules are described by iptables `iptables -L

Warning: iptables-legacy tables present, use iptables-legacy to see them

Chain INPUT (policy ACCEPT) target prot opt source destination
f2b-sshd tcp -- anywhere anywhere multiport dports ssh

Chain FORWARD (policy DROP) target prot opt source destination
DOCKER-USER all -- anywhere anywhere
DOCKER-ISOLATION-STAGE-1 all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED DOCKER all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT) target prot opt source destination

Chain DOCKER (1 references) target prot opt source destination
ACCEPT udp -- anywhere 172.17.0.2 udp dpt:51820 ACCEPT tcp -- anywhere 172.17.0.2 tcp dpt:51821

Chain DOCKER-ISOLATION-STAGE-1 (1 references) target prot opt source destination
DOCKER-ISOLATION-STAGE-2 all -- anywhere anywhere
RETURN all -- anywhere anywhere

Chain DOCKER-ISOLATION-STAGE-2 (1 references) target prot opt source destination
DROP all -- anywhere anywhere
RETURN all -- anywhere anywhere

Chain DOCKER-USER (1 references) target prot opt source destination
RETURN all -- anywhere anywhere

Chain f2b-sshd (1 references) target prot opt source destination
REJECT all -- 103.89.54.203 anywhere reject-with icmp-port-unreachable REJECT all -- 68.233.116.124 anywhere reject-with icmp-port-unreachable REJECT all -- 188.166.105.120 anywhere reject-with icmp-port-unreachable REJECT all -- h-94-254-0-234.na.cust.bahnhof.se anywhere reject-with icmp-port-unreachable RETURN all -- anywhere anywhere ` Снимок экрана 2024-10-06 в 13 06 25 how do I understand there should be a connection? When I turn it on, the connection disappears, there is no connection in the 3x-ui panel Снимок экрана 2024-10-06 в 14 51 09 (1) iPhone connects but V2rayA doesn't!

korsunav commented 1 week ago

If looking at v2raya screenshot it's looks like connection established. Try make from your Ubuntu host: curl ifconfig.io

If connection work properly you will see public ip of 3x-ui

It's just for sure. Because "online" status in 3x-ui not always showing properly status

dominikes commented 1 week ago
Снимок экрана 2024-10-06 в 20 28 09 (1)

But if I activate this connection to the server, then I lose access to sites via VPN the curl ifconfig.io command gives the correct server address if this option is disabled (red arrow in the picture). Or it does not need to be activated?