vftool icon indicating copy to clipboard operation
vftool copied to clipboard

Networking doesn’t work through NAT for Ubuntu cloud images

Open praneet-suresh opened this issue 5 years ago • 5 comments

praneet-suresh avatar Dec 14 '20 06:12 praneet-suresh

You have to setup network bridge in your ubuntu vm

https://www.tecmint.com/create-network-bridge-in-ubuntu/amp/

javacom avatar Dec 15 '20 03:12 javacom

How do I install bridge-utils without a network?

praneet-suresh avatar Dec 15 '20 03:12 praneet-suresh

I think you can install packages in the existing Ubuntu vm via the NAT for outgoing traffic. If not, you did not set it up properly in the first place and is not the problem of this vftool.

javacom avatar Dec 15 '20 03:12 javacom

For my is not working as well. What could I have done wrong?

marcelorubim avatar Jan 12 '21 18:01 marcelorubim

Ok I end up using the port forwarding on macOS similar to the win10 wsl2 to port forward from the os to the ipaddress of the vm. Just like I created a radpberrypios image as vm as in

http://iphonesdkdev.blogspot.com/2020/12/20201203.html

I created the VM with vnc server installed. Set the vm fixed ip address of 192.168.64.10 and in macOS host I do the port forwarding to the ipaddress and port number of the vm using this script. Then other machines on the LAN can vnc connect to the vm through the ipaddress of the macOS host with port 5910.

`echo " rdr pass on lo0 inet proto tcp from any to self port 5910 -> 192.168.64.10 port 5901

rdr pass on en0 inet proto tcp from any to any port 5910 -> 192.168.64.10 port 5901

rdr pass on wlan0 inet proto tcp from any to any port 5910 -> 192.168.64.10 port 5901

" | sudo pfctl -ef -`

javacom avatar May 03 '21 04:05 javacom