OpenVPN client connection and CPanel

Need help configuring your VPN? Just post here and you'll get that help.

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.
Post Reply
HPElite
OpenVpn Newbie
Posts: 4
Joined: Thu Feb 11, 2021 8:47 am

OpenVPN client connection and CPanel

Post by HPElite » Thu Feb 11, 2021 9:03 am

Hello Community,

I`m new here, its my first post(usually I can find all the instructions for almost anything by googling, but this one was no success). So here is my situation.

I have couple of dedicate/vps servers in a project, where I want to use VPN network in order for them to communicate between each other via 10.8.0.0 IPs.
I used a simple configuration of OpenVPN server installation and was able to accomplish for them to communicate with each other via 10.8.0.0 IPs.

One of the dedicated servers is going to be a website, running CentOS 7 and CPanel installed. When trying to activate a license of CP, the public IP of the VPN server is recognized instead of the public IP of the Web Server. How can I solve this?

How to make all the OpenVPN clients to use VPN network only for communication between each other, without the use of the VPN server's IP address?

Looking forward to a response.

300000
OpenVPN Expert
Posts: 685
Joined: Tue May 01, 2012 9:30 pm

Re: OpenVPN client connection and CPanel

Post by 300000 » Thu Feb 11, 2021 9:57 am

route 0.0.0.0 192.0.0.0 net_gateway
route 64.0.0.0 192.0.0.0 net_gateway
route 128.0.0.0 192.0.0.0 net_gateway
route 192.0.0.0 192.0.0.0 net_gateway

Adding this into your client that is all you need
Last edited by 300000 on Thu Feb 11, 2021 10:59 am, edited 1 time in total.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN client connection and CPanel

Post by TinCanTech » Thu Feb 11, 2021 10:17 am

The above is a stupid idea .. instead you need to understand --redirect-gateway

300000
OpenVPN Expert
Posts: 685
Joined: Tue May 01, 2012 9:30 pm

Re: OpenVPN client connection and CPanel

Post by 300000 » Thu Feb 11, 2021 10:26 am

What if he one profile for over vpn and one profile not over vpn .how can you do that with .

"The above is a stupid idea .. instead you need to understand --redirect-gateway*


Here is one question you need to answer if you said that is not good and how do you do on this one.?
--redirect-gateway can't do in this situation ok




"Colleagues using Mac and Windows clients can, at least, select whether all not to send "All Traffic" over the VPN connection (and the more sophisticated can set up multiple configurations on their client, to send all traffic, just the 'internal' traffic, or the internal plus traffic to selected other destinations."
Last edited by 300000 on Thu Feb 11, 2021 10:35 am, edited 1 time in total.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN client connection and CPanel

Post by TinCanTech » Thu Feb 11, 2021 10:28 am

When you learn to use google translate then I will understand your rubbish.

300000
OpenVPN Expert
Posts: 685
Joined: Tue May 01, 2012 9:30 pm

Re: OpenVPN client connection and CPanel

Post by 300000 » Thu Feb 11, 2021 10:41 am

With redirect-gateway it will never can do that requirement and you cant do that either so please answer my question first.?



There are more than one person can understand what I am writing in here and know exactly what it mean.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN client connection and CPanel

Post by TinCanTech » Thu Feb 11, 2021 10:47 am

300000 wrote:
Thu Feb 11, 2021 10:41 am
There are more than one person can understand what I am writing in here and know exactly what it mean
Not the person asking the question do not know what you talk about.

You answer is a bad answer because it make complex problem more complex.

Simple answer is "Don't use redirect-gateway"

Better answer is "Learn what redirect-gateway does"

Better answer than yours is "use pull-filter ignore 'redirect-gateway'"

When people don't know how to use something then good answer is explain the problem .. not make it worse with stupid idea just because it work for you because you don't like the right way.
Last edited by TinCanTech on Thu Feb 11, 2021 10:54 am, edited 1 time in total.

HPElite
OpenVpn Newbie
Posts: 4
Joined: Thu Feb 11, 2021 8:47 am

Re: OpenVPN client connection and CPanel

Post by HPElite » Thu Feb 11, 2021 10:51 am

300000 wrote:
Thu Feb 11, 2021 9:57 am
route 0.0.0.0 192.0.0.0 net_gateway
route 64.0.0.0 192.0.0.0 net_gateway
route 128.0.0.0 192.0.0.0 net_gateway
route 192.0.0.0 192.0.0.0 net_gateway

Adding this into your client ghat is all you need
Appreciate your quick response. It worked! Thank you for your help!

300000
OpenVPN Expert
Posts: 685
Joined: Tue May 01, 2012 9:30 pm

Re: OpenVPN client connection and CPanel

Post by 300000 » Thu Feb 11, 2021 10:57 am

HPElite wrote:
Thu Feb 11, 2021 10:51 am
300000 wrote:
Thu Feb 11, 2021 9:57 am
route 0.0.0.0 192.0.0.0 net_gateway
route 64.0.0.0 192.0.0.0 net_gateway
route 128.0.0.0 192.0.0.0 net_gateway
route 192.0.0.0 192.0.0.0 net_gateway

Adding this into your client ghat is all you need



Appreciate your quick response. It worked! Thank you for your help!

As soon as it work for you that is good.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN client connection and CPanel

Post by TinCanTech » Thu Feb 11, 2021 11:00 am

HPElite wrote:
Thu Feb 11, 2021 10:51 am
It worked!
But you have no idea why ..

HPElite
OpenVpn Newbie
Posts: 4
Joined: Thu Feb 11, 2021 8:47 am

Re: OpenVPN client connection and CPanel

Post by HPElite » Thu Feb 11, 2021 12:09 pm

TinCanTech wrote:
Thu Feb 11, 2021 11:00 am
HPElite wrote:
Thu Feb 11, 2021 10:51 am
It worked!
But you have no idea why ..
Why?

300000
OpenVPN Expert
Posts: 685
Joined: Tue May 01, 2012 9:30 pm

Re: OpenVPN client connection and CPanel

Post by 300000 » Thu Feb 11, 2021 1:10 pm

HPElite wrote:
Thu Feb 11, 2021 12:09 pm
TinCanTech wrote:
Thu Feb 11, 2021 11:00 am
HPElite wrote:
Thu Feb 11, 2021 10:51 am
It worked!
But you have no idea why ..
Why?



I am using Redirect-gateway over 10 year ago in DW WRT router and I know how to use it . But this way is more easy to use route so make it work better. As soon as it work and security it will be ok .

Let him think he is the best and everything he wrote is bible but nobody care at all.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN client connection and CPanel

Post by TinCanTech » Thu Feb 11, 2021 4:46 pm

300000 wrote:
Thu Feb 11, 2021 1:10 pm
this way is more easy to use route so make it work better
This is not a "better" way it is the wrong way.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN client connection and CPanel

Post by TinCanTech » Thu Feb 11, 2021 6:10 pm

Installing Seven routes which achieve nothing is definitely the wrong way.

HPElite
OpenVpn Newbie
Posts: 4
Joined: Thu Feb 11, 2021 8:47 am

Re: OpenVPN client connection and CPanel

Post by HPElite » Fri Feb 12, 2021 12:49 pm

TinCanTech wrote:
Thu Feb 11, 2021 6:10 pm
Installing Seven routes which achieve nothing is definitely the wrong way.
What would be the correct alternative?

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN client connection and CPanel

Post by TinCanTech » Fri Feb 12, 2021 5:08 pm

Read this post again.

Post Reply