Can't connect from my docker container to internet

pf_bpd

New Member
Feb 21, 2022
2
0
1
49
Hi, everyone,

I would like to connect two sites with wireguard.
To do this, I need to install the LSIO wireguard container at both sites.
I have an openmediavault server at one of the sites, the container is installed there, I can access the internet from the host and from the container.
The other site is running proxmox, I installed a VM there exclusively for the docker (Debian 11 vanilla). The VM runs beautifully, accesses everything and he is accessible from everywhere.
However, the docker container running on the VM does not reach the internet in any way. I cannot ping the VM_ or the proxmox, nothing.

The results to ping the VM (192.168.1.30):
ping 192.168.1.30
PING 192.168.1.30 (192.168.1.30) 56(84) bytes of data.
^C
--- 192.168.1.30 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2044ms

Can you help me to get started?

The docker container settings:

ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
3: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
link/none
inet 10.13.13.4/32 scope global wg0
valid_lft forever preferred_lft forever
5: eth0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:ac:12:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 172.18.0.2/16 brd 172.18.255.255 scope global eth0
valid_lft forever preferred_lft forever

ip r
default via 172.18.0.1 dev eth0
172.18.0.0/16 dev eth0 proto kernel scope link src 172.18.0.2

The LSIO container docker-compose.yml

version: "2.1"
services:
wireguard:
image: lscr.io/linuxserver/wireguard
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- SERVERURL=example.com #See point 2.
- SERVERPORT=51820 #To change see next post
# - PEERS=3 #See point 2. Number of clients you want to configure
- PEERDNS=auto
- INTERNAL_SUBNET=10.13.13.0 #Only change if it conflicts
- ALLOWEDIPS=0.0.0.0/0
volumes:
- ./config:/config #See point 1.
- /lib/modules:/lib/modules
ports:
- 51820:51820/udp #To change see next post
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
restart: unless-stopped

Everything on the openmedia server is running with the same settings, and can reach the internet.

The container on the proxmox is the client.

Thank you,

bpd
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!