Re: [fpc-other] Networking problem from Linux virtual machine hosting Lazarus
I found cause of the problem! - It turns out that another connectivity configuration screwed up the connection from my virtual machine! Here goes: Some time ago I wanted to share my Win7 VPN connection to the Raspberry Pi target for my Lazarus development when I worked on the Pi. The reason is the same as for the Linux virtual machine: to reach the company software version control server on the internal company network. The only way I could figure this out was to set up my Win7 as a WiFi hotspot and configure the VPN channel as shared to the WiFi access point network. The sharing was configured on the VPN connectoid targeting the AP network. Then whenever the Pi connected to the WiFi AP served by my Win7 laptop it would get access to the VPN network. Since the Pi also had an Ethernet wired connection I had to set up the route for 10.0.0.0 on the Pi to target the wlan0 network rather than the eth0 network. For this I created a shellscript that runs by cron every minute and checks the connection status and route table. With this I could connect to the VPN network (10.0.0.x) from the Pi via WiFi and everything else via eth0. On the Win7 laptop I have a batch script that enables the WiFi access point when needed. So I believed that this would make the connection depend on my WiFi AP state. But it seems like the very fact that "Internet Sharing" is enabled on the VPN connectoid towards the Access Point network excludes it from everything else including the VMWare NAT network... As soon as I removed the Internet sharing setting on the VPN connection I could start pinging VPN from the Linux Mint virtual machine when VPN is connected. So now I have created a second copy of the VPN connectoid (different name) where the sharing towards the Access point is enabled. When I need the RPi to have access I connect to VPN using this connectoid and start the access point. Otherwise I have the AP shut down and the original VPN connection (without sharing) active, and now the virtual machine gets a route into VPN. Rather convolved but actually working. PS: I tried to share the VPN connection to the Ethernet network on my Win7 laptop. The plan was for the other computers on my network (RPi units as well as my wife's laptop) to get access via a route to my laptop for that network. However, that fell flat on its face because when I did that my Ethernet networking on the PC stopped working. Could not reach local resources on my internal network anymore DS -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] Networking problem from Linux virtual machine hosting Lazarus
On Sat, February 27, 2016 22:36, Mark Morgan Lloyd wrote: > Bo Berglund wrote: >> I hope this might be acceptable to ask here even if it is FPC and >> Lazarus off topic No problem on this list. . . >> VMWare virtual adapter for vnet8 on main PC: >> IP=192.168.80.1 Mask=255.255.255.0 >> >> >> Linux Mint virtual machine: >> IP=192.168.80.130 Mask=255.255.255.0 GW=192.168.80.2 Wasn't the gateway number meant to be 192.168.80.1? . . >> I don't get any ping response. On the host system I get immediate >> response... >> >> Is there anyone here who has done this and made it work? > > I'm not sure how useful any comment from me it, since I tend to use > Qemu. However the obvious question that has to be asked is whether the > windows system knows how to route to the subnet on which the VMWare > guest resides. Yep - what's the result of 'route print' or 'netstat -r' there? Also, you need to make sure that there's no conflict (i.e. the 192.168.x.x range isn't routed elsewhere there). Also, when trying to sort it out, I'd try pinging from both sides. I assume that 'ping 192.168.80.1' works on the host machine, right (i.e. the virtual interface is up)? If so, would pinging 192.168.80.130 work from that side? Finally - not sure what you meant by the reference to the 'VPN network', but if your machine is connected to a VPN (external), you need to make sure that the VPN client isn't configured to disable all other connectivity. Tomas ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
Re: [fpc-other] Networking problem from Linux virtual machine hosting Lazarus
Bo Berglund wrote: I hope this might be acceptable to ask here even if it is FPC and Lazarus off topic I have created a VMWare WS12PRO virtual machine in which I have installed Linux Mint 17.3 MATE to host FreePascal 3.0.0 and Lazarus 1.6. These are now fine and working. As a last item I need to secure connectivity to the company version control system hosted on a Windows server on address 10.0.0.7 This network is on-line on the VMWare host PC (Windows7 X64) via VPN. I have set the virtual machine networking to NAT so it will use the host networking system and it should be able therefore to use the VPN channel to reach the 10.0.0.7 server. This is the addresses of my system: Main PC (VMWare host): IP=192.168.0.137 Mask=255.255.255.0 GW=192.168.0.129 VMWare virtual adapter for vnet8 on main PC: IP=192.168.80.1 Mask=255.255.255.0 Linux Mint virtual machine: IP=192.168.80.130 Mask=255.255.255.0 GW=192.168.80.2 Server on VPN network: IP=10.0.0.7 Mask=255.255.255.0 I know that this should work but I feel that there is something missing on the Linux side to make it actually start working... On previous Linux virtual machines (VMWare Workstation 7 level) I did not have to do anything else than connect VPN on my host PC to make that network also available on the virtual computer. Does not work now... I have tried adding route 10.0.0.0 on the linux side as follows: bosse@mint17mate ~ $ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.80.2 0.0.0.0 UG0 0 0 eth0 10.0.0.0 192.168.80.1 255.255.255.0 UG0 0 0 eth0 192.168.80.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0 But this does not work either. I don't get any ping response. On the host system I get immediate response... Is there anyone here who has done this and made it work? I'm not sure how useful any comment from me it, since I tend to use Qemu. However the obvious question that has to be asked is whether the windows system knows how to route to the subnet on which the VMWare guest resides. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other
[fpc-other] Networking problem from Linux virtual machine hosting Lazarus
I hope this might be acceptable to ask here even if it is FPC and Lazarus off topic I have created a VMWare WS12PRO virtual machine in which I have installed Linux Mint 17.3 MATE to host FreePascal 3.0.0 and Lazarus 1.6. These are now fine and working. As a last item I need to secure connectivity to the company version control system hosted on a Windows server on address 10.0.0.7 This network is on-line on the VMWare host PC (Windows7 X64) via VPN. I have set the virtual machine networking to NAT so it will use the host networking system and it should be able therefore to use the VPN channel to reach the 10.0.0.7 server. This is the addresses of my system: Main PC (VMWare host): IP=192.168.0.137 Mask=255.255.255.0 GW=192.168.0.129 VMWare virtual adapter for vnet8 on main PC: IP=192.168.80.1 Mask=255.255.255.0 Linux Mint virtual machine: IP=192.168.80.130 Mask=255.255.255.0 GW=192.168.80.2 Server on VPN network: IP=10.0.0.7 Mask=255.255.255.0 I know that this should work but I feel that there is something missing on the Linux side to make it actually start working... On previous Linux virtual machines (VMWare Workstation 7 level) I did not have to do anything else than connect VPN on my host PC to make that network also available on the virtual computer. Does not work now... I have tried adding route 10.0.0.0 on the linux side as follows: bosse@mint17mate ~ $ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.80.2 0.0.0.0 UG0 0 0 eth0 10.0.0.0 192.168.80.1 255.255.255.0 UG0 0 0 eth0 192.168.80.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0 But this does not work either. I don't get any ping response. On the host system I get immediate response... Is there anyone here who has done this and made it work? -- Bo Berglund Developer in Sweden ___ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other