My goal is to set up OpenVPN server on my PC as a guest in a virtual machine. I would like to use that OpenVPN server to join my home network from anywhere. On my PC (host) machine (192.168.1.116/24) I set a new vagrant box (OpenVPN server):
config.vm.define "node1" do |node1| node1.vm.box = "generic/ubuntu1904" node1.vm.network "public_network", ip: "192.168.1.88"
So my OpenVPN server sits on my home network with local IP 192.168.1.88. Here is the output from "ip a" command (eth0 is created default by VirtualBox):
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 08:00:27:11:de:a1 brd ff:ff:ff:ff:ff:ff inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic eth0 valid_lft 84383sec preferred_lft 84383sec 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 08:00:27:d2:71:a0 brd ff:ff:ff:ff:ff:ff inet 192.168.1.88/24 brd 192.168.1.255 scope global eth1 valid_lft forever preferred_lft forever
I installed and configured OpenVPN server via command:
wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh
Script "openvpn-install.sh" needs from me the IPv4 address of the network interface you want OpenVPN listening to. My question is that what IP should put there? 192.168.1.88 or public IP from https://ipchicken.com/?