OpenVPN server, cannot assign right IP on OVPN interface
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVpn Newbie
- Posts: 14
- Joined: Mon May 15, 2017 6:13 am
Re: OpenVPN server, cannot assign right IP on OVPN interface
Well, at this point I'm surrendering... I would like to thank every people who spent time with my issue.
I have another OpenVPN server installed on the same windows server running on Virtual Machine (FreeNAS installation) and it doesn't need any special routing on GW. I don't know why, but I can reach 192.168.10.0 subnet without problem. My goal was eliminate that VM to save memory on server, but at this point I have to leave as it is since it works perfect.
I have another OpenVPN server installed on the same windows server running on Virtual Machine (FreeNAS installation) and it doesn't need any special routing on GW. I don't know why, but I can reach 192.168.10.0 subnet without problem. My goal was eliminate that VM to save memory on server, but at this point I have to leave as it is since it works perfect.
-
- OpenVPN Super User
- Posts: 310
- Joined: Tue Apr 12, 2011 6:22 am
Re: OpenVPN server, cannot assign right IP on OVPN interface
1. your freenas vm probably does NAT for your VPN subnet out to your LAN that's why you it works without modifying your routes
2. if you want it to work on windows server you'll need to do the same ... i mean NAT , or do what Pippin said ... either way you have to install Routing and Remote Access Role on the server.
i have to say that i've run openvpn on plenty of windows servers both as vpn client and vpn server and every time it worked just fine ... just saying
did you also try using ?
instead of
2. if you want it to work on windows server you'll need to do the same ... i mean NAT , or do what Pippin said ... either way you have to install Routing and Remote Access Role on the server.
never had such issues , so i can't really say what could be the problem since we can't actually see the whole picture but surely you've missed somethingI have to do ipconfig /renew on server to assign the right IP (10.0.0.1)
i have to say that i've run openvpn on plenty of windows servers both as vpn client and vpn server and every time it worked just fine ... just saying
did you also try using ?
Code: Select all
dev-type tun
dev-node OpenVPN
Code: Select all
dev tun
dev-node OpenVPN
-
- OpenVpn Newbie
- Posts: 14
- Joined: Mon May 15, 2017 6:13 am
Re: OpenVPN server, cannot assign right IP on OVPN interface
Thank you TiTex,
unfortunately "dev-type tun" and "dev-node OpenVPN" doesn't work, and I still have to do ipconfig /renew. But this can be solved later.
Then, as you probably understood, I'm not a network "specialist", so I find it hard to understand the theory and then apply the "practice".
However, good point to start. My GW is an HW firewall (endian firewall) and I can add a route as suggested by Pippin. But server is @ home now, so adding route to my firewall/GW will not solve the issue when I move the server to the final destination.
I added the Routing and Remote Access Role to the server, but I'm stuck now. So, if you want, could you please drive me to understand on how configure the server routing considering:
192.168.10.10 => The server where OpenVPN runs
10.0.0.1 => The OpenVPN server IP
So that 10.0.0.0 subnet can reach the 192.168.10.0 ?
Many thanks for your patience
unfortunately "dev-type tun" and "dev-node OpenVPN" doesn't work, and I still have to do ipconfig /renew. But this can be solved later.
Then, as you probably understood, I'm not a network "specialist", so I find it hard to understand the theory and then apply the "practice".
However, good point to start. My GW is an HW firewall (endian firewall) and I can add a route as suggested by Pippin. But server is @ home now, so adding route to my firewall/GW will not solve the issue when I move the server to the final destination.
I added the Routing and Remote Access Role to the server, but I'm stuck now. So, if you want, could you please drive me to understand on how configure the server routing considering:
192.168.10.10 => The server where OpenVPN runs
10.0.0.1 => The OpenVPN server IP
So that 10.0.0.0 subnet can reach the 192.168.10.0 ?
Many thanks for your patience
-
- OpenVpn Newbie
- Posts: 14
- Joined: Mon May 15, 2017 6:13 am
Re: OpenVPN server, cannot assign right IP on OVPN interface
Well, probably I solved the routing issue in a very simple way. This the schema I adapted to my scope:
And this is the routing added to the server through Routing and Remote access interface:
Now, from VPN client, connected from external network, I'm able to ping and reach only the IP: 192.168.10.10. That's enough for now, to reach other machines I have to add anoter route. Or, find I way to add the whole subnet 192.168.10.0/24
Thank you again to all users who followed me in this journey!
NOW... I have to solve 2 other things.
1) Start OpenVPN server listening when Windows starts
2) Find a way to solve or find a workaround for the issue where OVPN server is not able to assign the correct IP address to its interface (for now manually solved by issue ipconfig /renew)
Code: Select all
+-------------------------+
(public IP)| |
{INTERNET}=============={ Router |
| |
| LAN switch |
+------------+------------+
| (192.168.10.1)
|
| +-----------------------+
| | |
| | OpenVPN | eth0: 192.168.10.10/24
+--------------{eth0 server | tun0: 10.0.0.1/24
| | |
| | {tun0} |
| +-----------------------+
|
+--------+-----------+
| |
| Other LAN clients |
| |
| 192.168.10.0/24 |
| (internal net) |
+--------------------+
Now, from VPN client, connected from external network, I'm able to ping and reach only the IP: 192.168.10.10. That's enough for now, to reach other machines I have to add anoter route. Or, find I way to add the whole subnet 192.168.10.0/24
Thank you again to all users who followed me in this journey!
NOW... I have to solve 2 other things.
1) Start OpenVPN server listening when Windows starts
2) Find a way to solve or find a workaround for the issue where OVPN server is not able to assign the correct IP address to its interface (for now manually solved by issue ipconfig /renew)
-
- OpenVpn Newbie
- Posts: 14
- Joined: Mon May 15, 2017 6:13 am
Re: OpenVPN server, cannot assign right IP on OVPN interface
Sorry for multiple posts, but I cannot edit the previous one.
2) Find a way to solve or find a workaround for the issue where OVPN server is not able to assign the correct IP address to its interface (for now manually solved by issue ipconfig /renew)
For the second issue, I cannot figure out how to solve it. I tried also to assign a static IP (10.0.0.1) to the OVPN interface, but after server start I got again the wrong IP. Maybe I can go with a script, but this script should be run also without login into server. The goal is automatically start everithing without human intervention in case Windows self-restart (like Windows Update).
1) Start OpenVPN server listening when Windows starts ==> This is solved just starting (and setup as automatic start) the OpenVPN Windows ServiceLucas Rey wrote: NOW... I have to solve 2 other things.
2) Find a way to solve or find a workaround for the issue where OVPN server is not able to assign the correct IP address to its interface (for now manually solved by issue ipconfig /renew)
For the second issue, I cannot figure out how to solve it. I tried also to assign a static IP (10.0.0.1) to the OVPN interface, but after server start I got again the wrong IP. Maybe I can go with a script, but this script should be run also without login into server. The goal is automatically start everithing without human intervention in case Windows self-restart (like Windows Update).
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: OpenVPN server, cannot assign right IP on OVPN interface
Try re-installing and starting from scratch .. you are the only person to ever report this problem and so it is most likely something local to your machine. You even state it works fine on another machine.
-
- OpenVpn Newbie
- Posts: 14
- Joined: Mon May 15, 2017 6:13 am
Re: OpenVPN server, cannot assign right IP on OVPN interface
I finally solved every issues... wow, what hard work!!!
I only needed some time to study the NAT network part and BAM! Now I can reach every machine on 192.168.10.0 subnet simply activating and configuring NAT on Routing role GUI to the ethernet card (NOT the TAP interface as I did before).
Then, activating OpenVPN service, it starts listening automatically and it assigns the right IP to its interface: 10.0.0.1
Tried 3 server reboot, without any issue!!!
Thank again community, you're great!
I only needed some time to study the NAT network part and BAM! Now I can reach every machine on 192.168.10.0 subnet simply activating and configuring NAT on Routing role GUI to the ethernet card (NOT the TAP interface as I did before).
Then, activating OpenVPN service, it starts listening automatically and it assigns the right IP to its interface: 10.0.0.1
Tried 3 server reboot, without any issue!!!
Thank again community, you're great!