WSL2 ip address range conflicts with my corporate VPN - vpn

I recently started using WSL2 instead of Virtual Box to run Linux on my PC. Sometimes I need to connect to git repositories that exist on my corporate VPN internal network. But recently WSL2 started giving the VM an address range that conflicts with my corporate VPN, so when the VPN is not connected the Linux system can communicate fine with the internet, but as soon as I go onto the VPN the Linux system can no longer communicate with the internet or host on the internal network because the range it is using (e.g. 172.18.230.215/20 ) is also advertised by the VPN as a range on the internal network.
Is there a way to force WSL2 to use only specific private ranges so I can find a range that does not conflict with the corp internal network?

Related

How to isolate and secure Windows Server HyperV VM running on my local PC?

I want to isolate the hyperv vm machine network from my local machine. I do not want hyper vm machine to see what other machines are in the same network when I do IP scanning from VM.
After creating the VM, you connect it to a virtual switch. That virtual switch is assigned to a NIC. That NIC connects to the internet and not your local LAN.
You can connect it to the internet via a dedicated connection or any number of other mechanisms. You're simply creating a second, independent network.
If you want the VM to use your LAN and a common internet connection, you'll have to resort to using a firewall.

VMWare Fusion 6.0.2 Network Bridging is allowing only certain specific traffic

I am using OSX Mavericks and VMWare Fusion v6.0.2.
I am running two Virtual machines, one Windows 7 Pro, and the other Debian Sid.
I do not wish to use NAT networking through the Host, I prefer to have the VMs sitting directly on the network, but I am having a problem getting the bridged networking functionality of VMWare Fusion working correctly. I have set the VMWare Network preferences page to Bridge the VMs to the Mac internal WiFi adapter.
Both VMs can ping the router, and they both get valid DHCP assigned IP addresses for the LAN. They can both connect to the Internet over the network bridge and browse and download files.
My problem is when I wish to communicate between the VM->Host, Host->VM, or VM->VM over other ports. For example if I try to SSH from OSX Host to the Debian VM, the request times out. The Windows 7 VM has a SQL Server running on it, but I cannot connect to it from the OSX host, or from the Debian VM. The Debian VM has a xsp4 web-server running on port 8080, but neither the OSX host nor the Debian VM can access it.
I can ping from Host->VM, VM->Host, and VM->VM with no issue, they can all see each other on the network, and the OSX host is sharing network folders to the Windows 7 VM without a hitch. It seems like it is allowing some communication, such as DHCP requests, Ping requests, Windows Network Shares, and Web Browsing, but is not allowing anything else.
I have turned off the Windows Firewall, OSX Mavericks firewall is turned off, and the Debian VM doesn't have selinux or iptables firewalls installed.
I have found several similar question threads while researching this problem, but a lot of them are for much older versions of VMWare Fusion, or are for VMWare Workstation which has different network preferences.
I can get these scenarios working to a degree if I switch VMWare's network settings to use NAT instead of bridging, but that messes up the IP addresses of the VMs, I want to keep them on the same network.
For what its worth, I did eventually come up with an answer for this.
There are two different versions of VMWare Fusion 6.x, Standard and Professional.
I was using the Standard version.
I changed the licence for a Professional licence, which allows you to add new network configurations in VMWare Preferences (and other cool things like that).
I added a new network with the default options, then assigned all of my VMs to that new network interface. I also turned on Promiscious mode in settings, but that might not have changed anything.
I then rebooted the VMs, set them up correctly to work on their new IP addresses, and Lo and Behold, I was able to establish connections between VM->Host and VM->VM. Exactly what I wanted.
I realize that this post is several years old, but since I had such a hard time with an issue similar to this, I wanted to post my answer as well, though I am not positive it really solved my issue. No problems still.
My setup:
MacBook Pro (Retina, 15-inch, Mid 2015)
OS X El Capitan
My problem:
In order to allow me to clone my private school git repository using ssh keys, I have to run a bridged network connection for my Windows 10 Eduction VM using VMWare Fusion.
What I've Tried:
http://www.kapilarya.com/windows-sockets-registry-entries-required-for-network-connectivity-is-missing
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1016466
And several other blog posts and forum replies, all attempting to do somewhat the same thing.
Answer:
After numerous attempts to reset just about everything you could, I took a step back and brainstormed. Then I thought, if my host machine (Macbook Pro) could connect wirelessly to the internet, this bridged connection should still work. I checked the Network Adapter's MAC Assigned to the VM's Network Adaptor and it was different from my host computer's wifi address (MAC Address). I then entered my host machine's wifi network address (MAC Address) in as the effective MAC Address for the Windows VM Network Adaptor and..voila, internet.

Configuring vmware networking to access static IP

I have a dedicated virtual debian server running with my website, and now have a copy of that so that I can try some configurations by running it virtually on my own PC. It runs fine, but I'm unable to access the machine through http.
The problem is that my machine has a fixed ip, something like 194.247.x.x . My home network however has computers in the range of 192.168.1.x
Is it possible to not change anything in my virtual machine and still configure vmware networking so that I'm able to access the websites it's running?
The only way I can see this happening for you is to use NAT (Network Address Translation) between your home network and your VM.
To do this, you could use a free software based router - something like Vyatta (www.vyatta.org) - and create a VM with two NICs - one with an IP on your home network, and the other with an IP on the same network as your VM. You then configure NAT to translate your home IP to your web server IP and then you're done.
There's nothing 'de-facto' VMware that will allow you to do this (other than using vShield - which will do NAT'ing anyway)...

adding Virtual PC 2007 to host network

I am using Virtual PC 2007 with Windows xp Pro as the Guest.
Is it possible to add the Virtual PC to the network of the guest PC and to the domain of the Guest PC?
I enabled NAT shared networking but that only allows internet access on the guest..
Thanks
This shouldn't be a problem when you add the guest to host's physical adapter:
In the settings for your VM, go to Networking and instead of "Shared networking (NAT)", select the NIC that's connected to the network on your host (e.g. "Realtek RTL8116 Gigabit Ethernet", or whatever your NIC is; this is equivalent to VMWare's Bridged Mode). That way, the guest will appear as a real computer on your network, and will work like a physical box on the network.
IIRC, MS VPC bypasses the default Windows firewall on the host, so only the guest's firewall applies; for other FW products, you may need to enable something like "permit packets not destined for this host".
Just to add to the above answer-
1.
Inside the Local Area Connection
Properties- VM Network Services Driver
wasnt installed without which the NIC
option wont appear in the Virtual
machine Network Adapter Configuration.
I reinstalled the Virtual PC and that
entry Virtual Machine Network
Driver appeared.
2.
Another helpful resource-
http://blogs.msdn.com/virtual_pc_guy/archive/2007/01/15/fixing-broken-virtual-networking.aspx
Shouldn't be a problem as long as you can connect to a domain controller from the virtual computer.
If you know the IP address of a domain controller, try to ping it. Then try to ping it using the computer name, to see if name resolution is working correctly. What happens when you join a domain using Control Panel | System. Do you receive an error message?
I have not used Virtual PC, only VMWare workstation on Linux, so I do not know how the networking setup is on Virtual PC. On VMWare, you can choose between bridged and NAT networking for a virtual machine. I have been able to set up Windows guest computers as members of a windows domain using both kinds of network setup.

VMWare Player on laptop - maintaining connection when wireless disconnected

I'm a complete newbie to VMWare and troubleshooting networking issues.
I'm running the buildix app through VMWare Player on my laptop. Things work fine when I'm connected to my home wireless network.
However, when I'm not connected to a network, my wireless card is turned off (eg., to save power) or when I'm connected to another wireless network, the Buildix appliance / VMWare player fails to get an ip address.
I only want the appliance to be able to communicate with my laptop.
I've tried this in all 3 networking modes : Host-Only (which is what I believe I want), NAT and Bridged, all with no success.
I've also taken a look at the settings by running vmnetcfg.exe in the VMWare Player install dir, but can't see anything obvious here.
Can someone please assist?
Regards
Marty
Host-Only mode is probably the way to go in your case. The problem is NAT and Bridged mode are relying on some third-party DHCP server to provide an IP address, and that server is not available when you are running disconnected.
VMware Workstation (not sure about Player) provides a built-in DHCP server if your machine is configured onto the right virtual network switch. You can also adjust which virtual switch has the DHCP server, what IP addresses it gives out, etc.
If Player does not support this feature, you may be forced into setting the IP address of the virtual machine manually. This is dependent on what OS you are running.

Resources