VPN config

carlosaarocha

Dabbler
Joined
Mar 31, 2022
Messages
12
Good afternoon,

I have a question about OpenVPN, if you can help me:

VPN clients are getting different IPs like 192.168.2.2, server is 192.168.1.88, so far so good. When a third or fourth client connects to the VPN, it receives an IP 192.168.2.3 and no longer has access to the files and only 192.168.2.2 has access. What could be wrong with the configuration?

It means that if only one client is connected at a time, it always receives the IP 192.168.2.2 and that's ok, the problem is only in multiple connectivity.

Additional Parameters:

Code:
push "route 192.168.1.0 255.255.255.0"
duplicate-cn
subnet topology


Thank you
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
I'd guess that somewhere in your configuration, you've put some firewall or networking rule that prevents all of the 192.168.2.0/24 network from talking across the network.

It's hard to know what's going wrong, since we don't really know what you're doing. How are you installing OpenVPN? Configuring OpenVPN? Is it in a container? VM? Different server all together? What is your network routing? Etc, etc.
 

carlosaarocha

Dabbler
Joined
Mar 31, 2022
Messages
12
Hello. Yes, I configured the firewall, but did that make one IP have access and another not? Within the same range of IPs... I configured the firewall in TUNABLES. The problem is only in multiple connections, when the system delivers IPs 192.168.2.3/4/5/6..., the IP 192.168.2.2 always works very well.
I'm using OpenVPN which comes by default on TrueNAS
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
I'm using OpenVPN which comes by default on TrueNAS
Now we know slightly more about what you're doing. But mostly we still know very little.

There's really no way to help until you provide some more details: configuration? settings? etc.
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
How did you set up OpenVPN? What configurations and settings did you use? Did you follow a guide to set up OpenVPN? How did you choose which values to put where?

When you connect to your server, what client are you using? How did you set up your client? What configurations and settings did you use? Did you follow a guide? etc.
 

carlosaarocha

Dabbler
Joined
Mar 31, 2022
Messages
12
Hi there.

I made some print screens to show you.

I followed a video for the configuration, I will send you the link.



I'm testing with the user Andre, my biggest problem is when I need to connect two clients at the same time, the one with the IP 192.168.2.3 has no access to anything on the NAS, the client with the IP 192.168.2.2 is to work normally.

I want the client, who is outside the office network and is connected to the VPN, only have access to the NAS, that is, the internet traffic continues to be through the physical location where the client is. Do you understand what I mean?

Sorry, I'm not an expert in these settings, we are a small company that we need to access files outside the office, we work outside the office, basically. We don't have a fixed place to work.
 

Attachments

  • CA.jpg
    CA.jpg
    127.8 KB · Views: 224
  • certificates.jpg
    certificates.jpg
    157.3 KB · Views: 192
  • Services.jpg
    Services.jpg
    184.2 KB · Views: 215
  • Tunables.jpg
    Tunables.jpg
    149.4 KB · Views: 208

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
Does it matter which client gets the .3 IP address? In other words, have you confirmed this behavior with both clients? I'm trying to rule out the possibility that the problem is with a specific client, rather than whoever gets the .3 IP address.

Can you show a screenshot of your static routes?
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
Do you have any other static routes?

Also, do you have the natd service enable in your tunables? Can you post your full list of tunables?
 

carlosaarocha

Dabbler
Joined
Mar 31, 2022
Messages
12
No, I don't have any other static routes.

I have now attached another image. I followed those videos I sent earlier.

Thank you for your help.
 

Attachments

  • Tunables.jpg
    Tunables.jpg
    103.6 KB · Views: 201

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
Can you ping .1.88 from the .3 client? I'm wondering if this is actually a problem with whichever file sharing service you are using, and not a network problem?
 

carlosaarocha

Dabbler
Joined
Mar 31, 2022
Messages
12
Sorry, I didn't check yet. Very busy days.
If is some file we are sharing, how can I have sure? How can I find this file?
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
It won't be a particular file; it will be in the configuration of the file sharing service (e.g. SMB).
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
At this point, I'm out of ideas. I set up a test environment, and followed the linked OpenVPN guide, and it works just fine with multiple clients, so I can only assume that some other setting that you have changed somewhere is what's preventing it from working.

For your own testing purposes, you might want to spin up TrueNAS in a VM on your client PC (for example, using VirtualBox), and run through the same settings to figure out where you might have gone wrong.
 

carlosaarocha

Dabbler
Joined
Mar 31, 2022
Messages
12
Sorry to bother you again, but the client that receives the IP 192.168.2.3 cannot ping the server, any idea?
 
Top