OPNsense Forum

English Forums => General Discussion => Topic started by: ehoitinga on April 23, 2020, 06:59:56 pm

Title: Trying to install OPNSense on Virtualbox on my laptop.
Post by: ehoitinga on April 23, 2020, 06:59:56 pm
Hi,

I'm coming from pfSense and I am trying to setup OPNSense on on Virtualbox (version 6.1.6) on my laptop (Linux Mint 19.3) for testing and trying out.

The hardware setup is as follows. The internal ethernet interface on my laptop (enx18dbf260f245) connects to my home network (192.168.1.0/24) providing access to my home network on my laptop. This interface will also be the LAN interface in my opnsense virtual machine. The interface is configured as bridged adapter in the network configuration of my opnsense virtual machine.

Then I have an USB3.0 to ethernet adapter (enx60634c83dbf0) connected to my laptop. On my laptop I configured this interface as "Link-Local Only". This interface is connected to my providers modem which is in bridged mode. My provider uses PPPoE to connect to the Internet and I want the WAN interface of my opnsense virtual machine to connect directly using PPPoE like my current pfsense firewall does. This interface is also configured as bridged adapter in the network configuration of my opnsense virtual machine.

Code: [Select]
erik@laptop-erik:~$ ifconfig
erik@laptop-erik:~$ ifconfig
enx18dbf260f245: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.95  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::1adb:f2ff:fe60:f245  prefixlen 64  scopeid 0x20<link>
        ether 18:db:f2:60:f2:45  txqueuelen 1000  (Ethernet)
        RX packets 210463  bytes 236417027 (236.4 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 76578  bytes 13579199 (13.5 MB)
        TX errors 0  dropped 9 overruns 0  carrier 0  collisions 0

enx60634c83dbf0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.216.52  netmask 255.255.0.0  broadcast 169.254.255.255
        ether 60:63:4c:83:db:f0  txqueuelen 1000  (Ethernet)
        RX packets 703  bytes 204576 (204.5 KB)
        RX errors 104002  dropped 6  overruns 0  frame 0
        TX packets 870  bytes 125098 (125.0 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
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 5936  bytes 2405880 (2.4 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5936  bytes 2405880 (2.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.178.0.78  netmask 255.255.255.255  destination 10.178.0.77
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 100  (UNSPEC)
        RX packets 1354  bytes 474104 (474.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1328  bytes 206076 (206.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

erik@laptop-erik:~$

Next I performed the install of opnsense. When this is finished I can access OPNSense virtual machine by its LAN IP address 192.168.1.1 with my browser. Then I walk through the setup wizard. In this wizard I configured the WAN interface's IPv4 Configuration Type as PPPoE and I filled in my PPPoE username and password just as I did on my pfSense box.

My WAN interface comes up and it get's a valid IP address from my provider. I also have a WAN gateway (WAN_PPOE) with a valid IP address from my provider.

On the console of the opnsense virtual machine I can ping hosts by IP and FQDN on the internet so local DNS works and there is connection to the Internet. This is the default route on the opnsense virtual machine:

Code: [Select]
root@opnsense:~ # route -n show default
   route to: 0.0.0.0
destination: 0.0.0.0
       mask: 0.0.0.0
    gateway: 91.182.112.1
        fib: 0
  interface: pppoe0
      flags: <UP,GATEWAY,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0      1492         1         0
root@opnsense:~ #

However when I click Check for Updates I get "Timeout while connecting to the selected mirror." Also "Update from console" does not work.

Also I get this error message in the console hen the WAN interface is activated and every time I make changes to the WAN interface:

Code: [Select]
WARNING: attempt to domain_add(netgraph) after domainfinalize()
What am I doing wrong here?

Thanks,

Erik

Title: Re: Trying to install OPNSense on Virtualbox on my laptop.
Post by: ehoitinga on April 24, 2020, 11:47:28 am
Ok, I tried another solution. I disconnected the ethernet interface that connects to my provider modem and activated the wireless interface on my laptop. Then I configured the second adapter in the configuration of my opnsense virtual machine as NAT. I started the opnsense virtual machine again and changed the IPv4 Configuration Type of the WAN interface from PPPoE to DHCP. I restarted the virtual machine.

When using this configuration "Check for updates" is working. I installed the proposed updates and I also installed the os-virtualbox plugin. Then after a reboot I reverted back to the configuration in my initial post.

But no luck. "Check for updates" is still not working and I get the same warning (WARNING: attempt to domain_add(netgraph) after domainfinalize()) on my WAN interface.

It looks like I'm missing something here, but I don't know what.

Any ideas?
Title: Re: Trying to install OPNSense on Virtualbox on my laptop.
Post by: ehoitinga on April 27, 2020, 03:50:58 pm
Hi,

I installed OPNSense in another configuration on VirtualBox. The first adapter I configured as a bridged adaptor. The second one, which will be the WAN interface, I configured as NAT. In this configuration I don't have these problems as stated in my initial post.

I ask this because I want to make the move from pfSense to OPNSense. But the above configuration does not reflect the actual configuration of my pfSense box.

Does anyone know if it is possible to use a second dedicated network adapter to make the WAN connection by PPPoE? I really want to try out OPNSense using the same configuration as on my actual pfSense box before buying my new DEC2640 (https://www.applianceshop.eu/security-appliances/19-rack-appliances/opnsense-based/dec2640-opnsense-a10-quad-core-ssd-rack-gen2plus.html).

Many thanks.

Erik