add local ip ipv4 and dns to config

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
openvpnuser12
OpenVpn Newbie
Posts: 1
Joined: Mon Jun 14, 2021 2:25 pm

add local ip ipv4 and dns to config

Post by openvpnuser12 » Mon Jun 14, 2021 2:36 pm

Hello, I'm trying to do something that i'm not sure is possibile but here it is.
I am working on a custom vpn kill switch . I am using comodo to block the entire internet except for openvpn.exe app.
I am also using windows-driver wintun in config to use the TUN adapter so the tap adapter is not used at all here but this aspect should not matter anyway.
Here is my problem...when I block everything in comodo i can't connect to a vpn server because of svchost not being able to access the local ip of my main internet adapter. So for svchost specifically i need to set up a rule in comodo that sounds like that:
Allow UDP out from source IPv4 Address (of my main adapter) to destination DNS servers ( still my main adapter).
Doing this let's me connect to my vpn server as openvpn can now fetch this local settings.
Now, what i'm trying to do is give openvpn this information directly so my comodo can block svchost entirely
So what should i add to my config exactly so that openvpn client can know the IPv4 ip and dns server of my main network adapter in order to connect?
If i use the 3rd party vpn client of the vpn service, i can block svchost entirely and still be able to connect to the server, i assume this is because that vpn client can grab those settings from the main adapter directly since is all local anyway while openvpn relies on DHCP service built into svchost that is blocked by comodo now.
I am using windows 10, any suggestion would be appreciated, been trying all day to fix this. thanks

Post Reply