@stgraber Thanks a lot for the answer.
@tomp @stgraber I want your help please.
I found out that from Ubuntu WiFi settings ( i have Ubuntu 18.04 as an OS ) you can turn your laptop as a WiFi hotspot. So i did it. (Let’s name it laptop1)
ifconfig showed that my wlp6s0 interface has as an inet ip 10.42.0.1.
From another laptop which also has Ubuntu 18.04 (let’s name it laptop2)
i connected to laptop1’s hotspot and i took to my wlo1 interface inet ip 10.42.0.76.
Ping worked fine.
I executed a python script who sends an image ( as a client) from laptop2 to laptop1. At laptop1 there was a server python script. Also worked perfect.
I did from laptop2
sudo lxc remote add isolatelaptop 10.42.0.1
and after that
sudo lxc launch isolatedlaptop:customimage isolatedlaptop:test1
As a result at laptop1 ( the access point wifi hotspot meaning) a container with name test1 was created.
After that to laptop1 ( wifi hotspot meaning) i create a profile called routed_10.42.0.200 and i configured it with the below .yaml file.
> config:
user.network-config: |
version: 2
ethernets:
eth0:
addresses:
- 10.42.0.200/32
nameservers:
addresses:
- 8.8.8.8
search: []
routes:
- to: 0.0.0.0/0
via: 10.42.0.1
on-link: true
description: Default LXD profile
devices:
eth0:
ipv4.address: 10.42.0.200
nictype: routed
parent: wlp6s0
type: nic
name: routed_10.42.0.200
used_by:
After that i did to laptop1
sudo lxc launch customImage VAMOS --profile default --profile routed_10.42.0.200
As i result i created the container VAMOS with 10.42.0.200 as an IPV4.
When i am doing from laptop2 ( with ip = 10.42.0.76 )
ping 10.42.0.200
it works OK.
But sadly , when i am doing from inside the container VAMOS it happens this.
root@VAMOS:~# ping 10.42.0.76
PING 10.42.0.76 (10.42.0.76) 56(84) bytes of data.
From 169.254.0.1 icmp_seq=1 Destination Port Unreachable
From 169.254.0.1 icmp_seq=2 Destination Port Unreachable
From 169.254.0.1 icmp_seq=3 Destination Port Unreachable
From 169.254.0.1 icmp_seq=4 Destination Port Unreachable
From 169.254.0.1 icmp_seq=5 Destination Port Unreachable
From 169.254.0.1 icmp_seq=6 Destination Port Unreachable
From 169.254.0.1 icmp_seq=7 Destination Port Unreachable
From 169.254.0.1 icmp_seq=8 Destination Port Unreachable
From the other hand :
root@VAMOS:~# ping 10.42.0.1
PING 10.42.0.1 (10.42.0.1) 56(84) bytes of data.
64 bytes from 10.42.0.1: icmp_seq=1 ttl=64 time=0.159 ms
64 bytes from 10.42.0.1: icmp_seq=2 ttl=64 time=0.084 ms
64 bytes from 10.42.0.1: icmp_seq=3 ttl=64 time=0.095 ms
64 bytes from 10.42.0.1: icmp_seq=4 ttl=64 time=0.093 ms
64 bytes from 10.42.0.1: icmp_seq=5 ttl=64 time=0.059 ms
64 bytes from 10.42.0.1: icmp_seq=6 ttl=64 time=0.092 ms
64 bytes from 10.42.0.1: icmp_seq=7 ttl=64 time=0.111 ms
64 bytes from 10.42.0.1: icmp_seq=8 ttl=64 time=0.095 ms
64 bytes from 10.42.0.1: icmp_seq=9 ttl=64 time=0.092 ms
I can imagine that something must be changed at the .yaml file.
Can you help me to solve this issue pleasse ?
I want to be able to communicate from inside the container with another laptop in the same subnet ( the subnet is defined from a laptop being a hotspot)
Thank in advance for any help. This issue is really important for me to be solved