You are not logged in.

#1 2017-12-05 16:57:24

TheGoliath
Member
From: Germany
Registered: 2017-03-24
Posts: 51
Website

[Solved] Container's webpage (and other services) aren't reachable

Good day,
I'm currently running into a problem, I want to reach e.g. a webpage served by my http-container on my host.
If I curl the page on the Host (hypervisor), it's working. If do the same on any other container on the same host, it times out.
I'm currently using a script for my ip-tables and maybe someone can help me. (I know, that I could spoof my dns to get the container to resolv)
the domain directly to its ip-addr. (192.168.100.2)

About my server:
Running Arch: Packages are up-to-date
iptables (script: https://hastebin.com/liloyilulo.bash)
Currently using systemd-nspawn for my container-system but migration over to lxc soon
DNSMasq: Used for assigning static ips to the containers

I hope for soon replys regarding the problem I've mentioned above,
Cheers,
- TheGoliath

Screenshot
https://imgur.com/W52JKTC

Last edited by TheGoliath (2018-09-22 20:10:20)

Offline

#2 2017-12-06 12:14:24

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [Solved] Container's webpage (and other services) aren't reachable

So you have a subnet at 192.168.100.0/24 that holds several containers.
You have setup NAT to make those containers accessible for outside by using ${IP_WAN_LOCAL}:someport .

The http server at 192.168.100.2 is reachable on that address and as ${IP_WAN_LOCAL}:{80|443|8000|6600} .


You want to access the http server from other containers
Let's verify if subnet routing is setup correctly.

From a container run ping ${IP_WAN_LOCAL} and ping 192.168.100.2 .

If both succeed, try curl with those addresses.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2018-09-22 20:08:32

TheGoliath
Member
From: Germany
Registered: 2017-03-24
Posts: 51
Website

Re: [Solved] Container's webpage (and other services) aren't reachable

Worked out quite nicely.
Was some misconfig here. (Fw)

Cheers

Offline

Board footer

Powered by FluxBB