On Tue, 1 Aug 2023 05:57:29 +0000 (UTC), Jason Long via Openvpn-users <openvpn-users@lists.sourceforge.net> wrote:
>OK, >in my use case I set up a VPN server on a public IP with the sole purpose to >act >as a connection point between an IoT device running on a LAN with no public IP >available which we needed to access in order to configure, control and retrieve >data from. > >The solution was: >- Set up an OpenVPN server with a dyn-DNS address on the public side. >- Configure it to only allow client-to-client connections (so no other routing) >- Use the ccd system to assign specific tunnel addresses to each device when >connecting >- Make the IoT device connect to the VPN as part of the boot sequence > >Now we can connect our PC to the same VPN and then connect to the device(s) >using their known tunnel addresses. > >This works like a charm. :-) > > >-- >Bo Berglund >>Developer in Sweden > > > >Hello, >Great. >What is the correct syntax of >push "dhcp-option dns 172.20.1.2" for Windows OS client? I wonder: Have you even bothered to read/search in the OpenVPN documentation at all? Seems not since you are wildly posting ne question threads here, which can be answered by reading the doc and searching for your arguments... https://openvpn.net/community-resources/reference-manual-for-openvpn-2-4/ https://openvpn.net/community-resources/reference-manual-for-openvpn-2-6/ And this answer is written in the community HowTo https://community.openvpn.net/openvpn/wiki/HOWTO ------------------ Pushing DHCP options to clients The OpenVPN server can push DHCP options such as DNS and WINS server addresses to clients. Windows clients can accept pushed DHCP options natively, while non-Windows clients can accept them by using a client-side --up script which parses the foreign_option_n environmental variable list. See ?Using DNS servers pushed to clients. For example, suppose you would like connecting clients to use an internal DNS server at 10.66.0.4 or 10.66.0.5 and a WINS server at 10.66.0.8. Add this to the OpenVPN server configuration: push "dhcp-option DNS 10.66.0.4" push "dhcp-option DNS 10.66.0.5" push "dhcp-option WINS 10.66.0.8" To test this feature on Windows, run the following from a command prompt window after the machine has connected to an OpenVPN server: ipconfig /all The entry for the TAP-Windows adapter should show the DHCP options which were pushed by the server. ------------------ It is pretty disrespectful to totally ignore the existing documentation and instead spam a mailing list like this one! Just in the last 10 days you have started no less than 14 separate threads concerning this non-standard project of yours. This in a list that normally carries just a handful of threads per month! Please realize that these discussions wind up into everyones mailboxes! I belive you would be better off posting into the OpenVPN web forum instead and keep your questions inside a single thread there: https://forums.openvpn.net/index.php -- > Bo Berglund > Developer in Sweden Hello, Thank you so much for useful information and advice. I read documents, but I search mostly on the internet and find questions similar to mine, and when I don't get any results, I ask questions here. For example, about the IP Forwarding and access to the internal network, I found a thread on the Ubuntu forum and someone had the same problem as me. In response to a question, a user had said that IP Forwarding must be disabled to access the internal network remotely. The question had a green tick tag. It means that the problem was solved by that user's answer. I disabled the IP Forwarding, but my problem not solved and I asked here. Is it bad? It is not my intention to spam here or anywhere else. If I ask a lot of questions, it shows my eagerness to learn. And about the https://forums.openvpn.net/index.php, I asked the questions there too, but I did not receive an answer. I guess, that forum is disabled. _______________________________________________ Openvpn-users mailing list Openvpn-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-users _______________________________________________ Openvpn-users mailing list Openvpn-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-users