Openvpn defalut-route


#1

Hello.
I’ve just made Openvpn configuration on my VPS. My Windows 10 PC can connect without any problems.
BUT the dafault-route from OpenVPN server is not installed to my PC rouring table.

I’ve tried these 3 ways:
1)

openvpn vtun0 {
        local-port 443
        mode server
        protocol tcp-passive
        server {
            name-server 8.8.8.8
           push-route 0.0.0.0/0
            subnet 192.168.255.0/24
        }
        tls {
            ca-cert-file /config/auth/ca.crt
            cert-file /config/auth/t-rex-server.crt
            dh-file /config/auth/dh1024.pem
            key-file /config/auth/t-rex-server.key
openvpn vtun0 {
        local-port 443
        mode server
        replace-default-route 
        protocol tcp-passive
        server {
            name-server 8.8.8.8
            push-route 0.0.0.0/0
            subnet 192.168.255.0/24
        }
        tls {
            ca-cert-file /config/auth/ca.crt
            cert-file /config/auth/t-rex-server.crt
            dh-file /config/auth/dh1024.pem
            key-file /config/auth/t-rex-server.key
       openvpn vtun0 {
        local-port 443
        mode server
        openvpn-option "--push redirect-gateway def1"
        protocol tcp-passive
        server {
            name-server 8.8.8.8
            push-route 0.0.0.0/0
            subnet 192.168.255.0/24
        }
        tls {
            ca-cert-file /config/auth/ca.crt
            cert-file /config/auth/t-rex-server.crt
            dh-file /config/auth/dh1024.pem
            key-file /config/auth/t-rex-server.key

How can fix with this issue?


#2

Hello,
try
push “redirect-gateway autolocal”
instead of
push “redirect-gateway def1”


#3

Sad but nothing changed =(


#4

Are you running openVPN as administrator? I’m not sure youcan muck with the routing table if you aren’t administrator


#5

Yes. That’s my bad. Everything works under administrator. Thank you!


#6

I have the “opposite” bug: I don’t want that openvpn server on VyOS pushes default-route to clients so I have try to use "–push “redirect-private local” but I can not insert double quotes inside double quotes in configuration commands! Maybe your configuration, with double-double quotes, has the same problem as mine…
Here the bug;
https://phabricator.vyos.net/T127