-
Notifications
You must be signed in to change notification settings - Fork 76
Network Management
Mustafa Arıcı edited this page Oct 6, 2017
·
5 revisions
Available network types can be shown by invoking;
$ ovpm net types
+---+-----------+-------------------------------+
| # | NET TYPE | DESC |
+---+-----------+-------------------------------+
| 1 | SERVERNET | network behind vpn server |
| 2 | ROUTE | network to be pushed as route |
+---+-----------+-------------------------------+
Networks can be defined via CLI or web interface.
# define SERVERNET type network
$ ovpm net def --name example1 --type SERVERNET --cidr 172.16.16.0/24
INFO[0000] network created: asd (172.16.16.0/24)
# define ROUTE type network (w/o via)
$ ovpm net def --name example2 --type ROUTE --cidr 8.8.8.8/32
INFO[0000] network created: asd (172.16.16.0/24)
# define ROUTE type network (w/ via)
$ ovpm net def --name example3 --type ROUTE --cidr 8.8.8.8/32 --via 192.168.1.1
INFO[0000] network created: asd (172.16.16.0/24)
Networks undefined as follows;
$ ovpm net undef --net example1
INFO[0000] network deleted: example1 (172.16.16.0/24)
Networks defined in the system can be displayed by invoking;
$ ovpm net list
+---+----------+----------------------------+-----------+-------+--------------------------------+
| # | NAME | CIDR | TYPE | ASSOC | CREATED AT |
+---+----------+----------------------------+-----------+-------+--------------------------------+
| 1 | example1 | 172.16.16.0/24 | SERVERNET | | Wed Oct 4 12:17:51 +0300 2017 |
| 2 | example2 | 8.8.8.8/32 via vpn-server | ROUTE | | Wed Oct 4 12:18:16 +0300 2017 |
| 3 | example3 | 8.8.4.4/32 via 192.168.1.1 | ROUTE | | Wed Oct 4 12:18:37 +0300 2017 |
+---+----------+----------------------------+-----------+-------+--------------------------------+
Users are associated/dissociated to the networks as follows;
# Associate user to network
$ ovpm net assoc --net example1 --user joe
INFO[0000] network associated: user:joe <-> network:example1
# Dissociate user from network
$ ovpm net dissoc --net example1 --user joe
INFO[0000] network dissociated: user:joe <-> network:example1