How to forward packets to the docker network?

vds 2:

I configure iproute2 with this script #!/bin/bashIF2=wg0#IF — IP адрес на WG интерфейсеIP2=10.228.228.2# - Pastebin.com , I run the script on vds 2, on vds 1 I drive
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 25565 -j DNAT --to 10.228.228.2:25565
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 10.228.228.2:80
after I try to go to the site, the site enters but the server running in docker does not enter, what could have gone wrong?
docker: root@debian:/home/debian# docker container lsCONTAINER ID IMAGE - Pastebin.com

  • How do I forward packets from 10.228.228.2 to the docker network?
  • Forwarding via iproute2 only works for 192.168.0.226/0.0.0.0/127.0.0.1 (virtual machine networks)
  • Is there a way to send packets through iproute2 to the docker network - because the game server is running in it, game server port 25565.

209172474-c133f643-1cc4-46f6-9feb-2a3dfcf41ac9 — ImgBB How do I configure this to log in to the server? If the rules are removed via iptables -t nat -F - then the server enters but the Ip of the players is “172.18.0.1”

I am not realy sure why you choose to forward packets using your own commands.

Can you elaborate why publishing the container port to a host port when creating the conatiner using the --publish ${host port}:${container port} (or its short form -p instead of --publish) was not a suitable solution for you?

Also, next time please format your post according this topic: How to format your forum posts

I haven’t looked at your screenshot, as I don’t read when people paste screenshot of texts. I just saw that you used iptables and the bullet points at the bottom of your post. Furthermore, I skipped everything else, because it is hard to read without proper formatting.