Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Issue with connecting VM to Internet
« previous
next »
Print
Pages: [
1
]
Author
Topic: Issue with connecting VM to Internet (Read 1952 times)
dalibor
Newbie
Posts: 2
Karma: 0
Issue with connecting VM to Internet
«
on:
February 12, 2023, 05:08:13 pm »
Hello all
After lot of searching and trying I decided to ask for help on this forum.
In short, I have VMware Worstation installed on my desktop PC (Linux Mint21) and there I have VM OPNsense and another VM "TestVM" in different subnet. The problem is that I cannot connect VM "TestVM" to internet.
I'll try to put here as much details as possible to have clear picture of the environment (please see attacment).
Router IP: 192.168.0.1
Desktop PC (physical): 192.168.0.100/24
VMware Workstation 16 PRO:
vmnet0 - Bridge: 192.168.0.0/24
vmnet8 - Host-Only: 192.168.1.0/24
OPNSense:
WAN interface connected to vmnet0 (Bridge), IP: 192.168.0.254/24, GW: 192.168.0.1
LAN interface connected to vmnet8 (Host-Only), : IP: 192.168.1.254/24
VM "TestVM":
IP: 192.168.1.6/24
GW: 192.168.1.254
I'm accessing the OPNsense management GUI on IP 192.168.1.254.
I created rule to pass from LAN to WAN and vice versa, played with gateways on LAN interface, I cannot get it to work.
I can ping the TestVM from my desktop PC - 192.168.0.100 -> 192.168.1.6.
I can ping the my desktop PC from TestVM - 192.168.1.6 -> 192.168.0.100.
However, I cannot ping the router from TestVM: 192.168.1.6 -> 192.168.0.1. Here in FW logs I see that the traffic is allowed, but I'm not getting ping response.
Also I cannot ping the OPNsense WAN interfase from my desktop PC (192.168.0.100 -> 192.168.0.254) and aslo from the router (192.168.0.1 -> 192.168.0.254 (same subnet)
I cannot figure it out what I'm doing wrong, so I really appreciate some help/advice.
Thank you in advance.
«
Last Edit: February 12, 2023, 05:18:26 pm by dalibor
»
Logged
Demusman
Sr. Member
Posts: 304
Karma: 13
Re: Issue with connecting VM to Internet
«
Reply #1 on:
February 12, 2023, 06:37:51 pm »
First off, you don't need to add any rules or gateways on the LAN for this to work.
A default install will give you internet access from the LAN interface.
So 'undo' everything you 'tried', or better yet, just start over with a fresh install.
Then go to interfaces/WAN and uncheck block private networks.
Save/Apply.
For future reference, when you have a problem like this, cut it in half. go into the gui first. See if you have internet from there.
If not, you just cut your network in half and you know the problem is not on the LAN.
Logged
dalibor
Newbie
Posts: 2
Karma: 0
Re: Issue with connecting VM to Internet
«
Reply #2 on:
February 13, 2023, 02:08:47 pm »
Hi Demusman, thank you for reply...
I did what you said, I reset the OPNsense to factory defaults and stated from begining. I left the default settings and yes, I was able to connect to Internet from LAN, thank you for the tip.
However, the WAN interface was configured via DHCP, when I set fixed IP config with manually added gateway for WAN, I lost the connection to Internet again.
After some playing, I found out that for WAN interface I must explicitly set the gateway in the WAN configuration, previously it was set to Auto-Detect and this was it was not working.
Anyway, thank you very mush, problem solved.
Cheers!
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Issue with connecting VM to Internet