User overview: Last IP Adress 172.17.0.1


hi, something Im disappointed about is, that there seems to be a conflict if it comes to ip-adresses. I installed the forum as described in the official guide because there is told that this is the only supported self-host version. so I really hoped, that almost everything work and almost everything works fine- except this.

every user gets a 172.17.x.x IP adress :frowning: I think it has something to do with the docker-system.

the only change I’m aware of that I did, which could take effect at the docker network configuration is the following changes after setting up a brand new docker forum:

  1. pico /etc/docker/daemon.json
  2. inserting
{
  "iptables": false
}
  1. sudo systemctl restart docker

(because if Im configuring/restoring the forum data I’d like to control 80/443 access by my debian host firewall (ufw) to allow only my public ip adress, which is ignored by docker if I don’t do the steps above.

but I can not imagine that this configuration would take effect on the ip adresses which get noted of the users by their registration/access.

P.S: even if you’re not a dev and just a basic user, it would be interesting for me to know if you can see the different public ip adresses of your users if you have self-hosted docker instance :slight_smile:

I already checked out this posts:

but I don’t use a proxy afaik.
thats the first thing I checked before I started the docker-install script:
no apache or nginx is installed on my debian VPS Host. I can not stop believing that it has something to do with the docker proxy/nginx webserver. If you have any ideas what I could check, I’d be thankful :slight_smile:

edit:
here are my ip configurations on my host. it really seems, that the 172.17.x.x ip adresses are somehow related with the docker image:

user@linux-host-system:~$ ip addr show
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
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 4a:x:x:x:x:02 brd ff:ff:ff:ff:ff:ff
    altname enp0s18
    inet <my-public-ipv4-adress>/24 brd 37.x.x.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2a0e:x:x:x::1/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::x:x:x:x/64 scope link 
       valid_lft forever preferred_lft forever
3: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:x:x:x:xx:d7 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::x:x:x:x/64 scope link 
       valid_lft forever preferred_lft forever
101: veth90d312b@if100: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default 
    link/ether 32:x:x:x:x:75 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::3002:x:x:3775/64 scope link 
       valid_lft forever preferred_lft forever

If you don’t make those changes, you won’t have a problem.

If you want to do that, you’ll need to learn more about Docker than I know to get the right IP address to Discourse.

Maybe you can get a hint from templates/cloudflare.template.yml. The bit that says set_real_ip_from is probably what you’re looking for.

1 Like

@pfaffman thanks for your idea!

In the end I already posted the solution somehow:
After deleting the file /etc/docker/daemon.json and executing systemctl restart docker and also waiting a little bit time the forum loaded again and displayed my current correct public IP adress at the overview of my user. :smile:

1 Like