Score:0

force ovpn user to request for non public DNS Server

cg flag

I need to force users for request to alasghar.com for connect to openvpn server, as alasghar.com is not public dns and not resolve by dns server.

Can I change clients ovpn file to force request alasghar.com from for example from 1.2.3.4 ?

I use " dhcp-option DNS <dns_server_ip_address> " in ovpn file but not request dns to my dns server because until client no connect to openvpn server this option not work.

Because I setup private dns server in internet for my openvpn clients. and alasghar.com has multiple ip address so I cant set one ip in ovpn file, in my dns server I have round robin to ip addresses bound to alasghar.com.

Ginnungagap avatar
gu flag
Do not ever use a domain that you do not own for private infrastructure, it'll be hell if anyone ever registers it with all kinds of weird failures. The answer to your problem is to just register alasghar.com and be done with it. Also read [Top level domain/domain suffix for private network?](https://serverfault.com/questions/17255/).
Behzad Soltaniyan avatar
cg flag
thanks for reply; but i didnt like to register domain in public dns. thera is any way to this? by edit only ovpn file can resolve my domain.
vidarlo avatar
ar flag
Yes - but you can't *force* your clients. See e.g. [this Q&A](https://superuser.com/questions/637579/setting-dns-servers-using-openvpn-client-config-file) over at superuser.com
Behzad Soltaniyan avatar
cg flag
thanks, but i dont have permission on client system or android to do this.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.