Estou tentando configurar uma máquina virtual com o servidor Ubuntu, que contém uma conexão vpn. No VirtualBox, eu tenho 2 adaptadores de rede: um NAT - > ens0p8 um somente host - > ens0p3
Dentro da VM, eu roteei o tráfego de ens0p8 para tun0, que é a conexão VPN de que preciso e a saída para ens0p3 (somente host)
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 tun0
0.0.0.0 10.0.3.2 0.0.0.0 UG 100 0 0 enp0s8
10.0.3.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s8
10.0.3.2 0.0.0.0 255.255.255.255 UH 100 0 0 enp0s8
10.200.160.0 0.0.0.0 255.255.248.0 U 0 0 0 tun0
79.174.207.132 10.0.3.2 255.255.255.255 UGH 0 0 0 enp0s8
192.168.56.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s3
ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.56.56 netmask 255.255.255.0 broadcast 192.168.56.255
inet6 fe80::a00:27ff:fef1:773c prefixlen 64 scopeid 0x20<link>
ether 08:00:27:f1:77:3c txqueuelen 1000 (Ethernet)
RX packets 826 bytes 67712 (67.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 870 bytes 89996 (89.9 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.3.15 netmask 255.255.255.0 broadcast 10.0.3.255
inet6 fe80::a00:27ff:fe01:4112 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:01:41:12 txqueuelen 1000 (Ethernet)
RX packets 502 bytes 322257 (322.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 379 bytes 40740 (40.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 96 bytes 7172 (7.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 96 bytes 7172 (7.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1406
inet 10.200.161.69 netmask 255.255.255.255 destination 10.200.161.69
inet6 fe80::f3a5:4f44:45d3:1b1d prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
RX packets 6 bytes 720 (720.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 30 bytes 1932 (1.9 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Não consigo obter a conexão fora da caixa virtual no Windows.
Wireless LAN adapter Wireless Network Connection:
Connection-specific DNS Suffix . :
IPv4 Address. . . . . . . . . . . : 192.168.0.103
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
Ethernet adapter VirtualBox Host-Only Network:
Connection-specific DNS Suffix . :
IPv4 Address. . . . . . . . . . . : 192.168.56.10
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 0.0.0.0
192.168.56.1
Tags networking virtualbox vpn ubuntu