OpenVPN: Cannot connect with --pull-filter ignore redirect-gateway

Address of ovpn server to avoid recurrent loop packet passing.

Won’t routes 0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 eth0 and 192.168.230.0 0.0.0.0 255.255.255.0 U 0 0 0 tun0 do this?

This rules says that routing via virtual gateway is preferred. So all packets for ovpn server are routed via tun. It is necessary to add the exception for ovpn server address.

I’m too lazy to check the configuration on VM right now. Maybe other members of community will help you.

I dont really get what you want. Do you still want to bind only some apps to the tun? Then why are you setting a gateway at all? Remove route option in the config and it should work “curl -v --interface tun0 http://ifconfig.me”

Doesn’t work without route option (neither in Windows nor Linux)

What does curl return

Curl works, but I still can’t bind to interface’s ip.

What kind of application you want to bind?

V2Ray outbound

It works, i did it just like that on my vps: ignored default gateway in ovpn and specified “interface” sockopt in xray freedom out. Whats your result? Do you get an error or xray still binds to default gateway?

Ok, how to specify interface name in windows?

Probably the same way. Windows wg/awg app based split tunneling is a similar topic

Please send your outbound configuration (if it’s not secret).

didn’t test

{
    "inbounds": [
        {
            "listen": "127.0.0.1",
            "port": "1080",
            "protocol": "socks",
            "settings": {
                "ip": "127.0.0.1",
                "udp": true
            }
        }
    ],
    "log": {
        "loglevel": "warning"
    },
    "outbounds": [
        {
            "protocol": "freedom",
            "streamSettings": {
                "sockopt": {
                    "interface": "tun0"
                }
            },
            "tag": "direct"
        }
    ],
    "routing": {
        "domainStrategy": "AsIs",
        "rules": []
    }
}

similar sing-box config is in that topic

Thank you very much!

Doesn’t work in v2ray 4.34.0 (v5.0.6+ required)

@0ka It’s preferred to work with gray, it doesn’t support features from v5.0.6

idk why such an old software, but you can use another routing table (555) with only your tun as a gateway, use clean freedom outbound and run gray as a user, then use “ip rule add uuidrange userid-userid table 555” (or just run the software you need as a user instead of gray)

But how to make it work like on windows, adding route 0.0.0.0 0.0.0.0 to ovpn specifies interface gateway and allows to bind to this ip?

wdym? i have no idea how you bound the apps to the tun interface on windows