E
E
Evgeny Khalyavka2018-08-10 00:33:31
openvpn
Evgeny Khalyavka, 2018-08-10 00:33:31

Setting up access to a virtual machine from an external local network?

There is a server under Debian 9. Virtual machines, Debian 9 and Win8 are deployed on it. The network between them is default from libvirta (192.168.122.0), with access to the world. The host has OpenVpn (10.1.0.1). Tell me how to set up routing in such a way that from a machine (10.1.0.2) from another local network, access VM resources, while not using the libvirta network, creating a new locale for each of the VMs?
ifconfig------------------------------------------------- ------------------------------
enp0s31f6: flags=4163 mtu 1500
inet xx.xx.xx.xx netmask 255.255.255.192 broadcast xx.xx.xx.xx
ether 90:1b:0e:fe:13:da txqueuelen 1000 (Ethernet)
RX packets 3077 bytes 657184 (641.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2357 bytes 278790 (272.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xef000000-ef020000
lo: flags=73 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid
loop txqueuelen 1 (Local Loopback)
RX packets 176 bytes 13668 (13.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 176 bytes 13668 (13.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4163 mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:bd:e7:e5 txqueuelen 1000 (Ethernet)
RX packets 935 bytes 71805 (70.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 446 bytes 385576 (376.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vnet0: flags=4163 mtu 1500
inet6 fe80::fc54:ff:feb7:2d3f prefixlen 64 scopeid 0x20
ether fe:54:00:b7:2d:3f txqueuelen 1000 (Ethernet)
RX packets 522 bytes 41990 ( 41.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2090 bytes 489345 (477.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vnet1: flags=4163 mtu 1500
inet6 fe80::fc54:ff:fe84:b650 prefixlen 64 scopeid 0x20
ether fe:54:00:84:b6:50 txqueuelen 1000 (Ethernet)
RX packets 214 bytes 22624 (22.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1732 bytes 105859 (103.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
openvpn server.conf-------------------- ----------------------------
port 1194 # port
proto tcp # connection type
dev tap0 # interface type, helps avoid
server 10.1 tunnel restrictions. 0.0 255.255.255.0 # subnet
ifconfig-pool-persist /etc/openvpn/ipp.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
## Log files ##
status /var/log/openvpn-status.log
log /var/log/openvpn.log
verb 3

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question