This is somewhat of black magic to me...
Do you mean that I should have this in the client file instead:
Code: Select all
ifconfig-push 10.9.0.2 255.255.255.0
Meanwhile I discovered that I made a mistake in the server conf file. I am using the example server.conf file that comes with openvpn.
The comments there said I should enable the ccd, which I did, but also that I should enable the route, which I missed, so after I found this and corrected it the contents of the server.conf file for ccd reads like this:
Code: Select all
client-config-dir /etc/openvpn/ccd
route 10.9.0.0 255.255.255.252
But now I am getting really worried because the netmask 252 only has space for three addresses 1..3!
This would make it totally impossible to route a client with addresses ending in 5 or 6, right!
What gives here, is the documentation again misleading? What is correct here?
Code: Select all
The order of the IP address pair must be reversed compared to the HOWTO
Correct, is mistake in doc.
For topology subnet:
10.8.1.0 - Network
10.8.1.1 - Server IP
10.8.1.254 - DHCP
10.8.1.255 - Broadcast
So usable client
tunnel IP addresses are 10.8.1.2 - 10.8.1.253
But is the IP table in the
HOWTO wrong then? It lists different pairs to use and no others...
First get the basic going/understanding...
Basic understanding I think I have but this seems not to be basic, really, I am trying to make 1-4 clients only able to access the server 10.0.0.10 while all other should continue working as before.
Another issue is that I am working on the server via its OpenVPN, in actual fact the server sits 8400 km away from me.
It is working just fine for the intended internal use where the clients would have access to all of the internal LAN.
But I need to modify it to support the connection from a contractor, who should only be able to talk to the Subversion server PC.
So by the looks of it I have to:
- Use ccd to give the special client different tunnel IP addresses
- configure routing such that OpenVPN knows how to handle this client
- configure IPTABLES on the server to enable communication with a single server (this is my main "understanding" hurdle...
To me that means giving the client an address in the range 10.9.0.0 rather than 10.8.0.0 or 10.8.1.0 as the current setup does.
The best would be to use ccd such that if a client is not listed he will not see any difference at all from earlier, while the limited clients, who are given 10.9.0.0 addresses will be limited to the specific server.
I understand it such that if not mentioned in a client file a client gets its configuration according to the main server conf file, right?
So I have to configure everything
correctly (or at least such that it will still work for the current setup) before I restart openvpn, otherwise I will lose connectivity and will have problems getting it back....