-
Docker container with exposed port on user defined network sees NAT IP address
Experencing an issue where docker containers with exposed ports do not see the true client IP address, but instead see the gateway IP address of a given docker network when receiving packets. To demonstrate, I've got a setup with 3 machines: * A windows machine acting as the client on 192.168.1.228 * An unraid machine on 192.168.1.2 * An ubuntu machine on 192.168.1.243 I create a user-defined network with the bridge driver. On the ubuntu machine, when packets come in to containers the IP address on the packet is seen as the expected 192.168.1.228 But on the unraid machine, when packets come in to containers the IP address on the packet is seen as the gateway for the user defined network, in this case 172.17.0.1 Netcat within the swag image is used to demonstrate: On the ubuntu machine, run netcat listening on port 9000 then connect from the windows machine. Here we can see that the remote address is seen as 192.168.1.228 user@ubuntu:~$ docker run --rm -it --network mynet -p 9000:9000 --entrypoint /usr/bin/nc lscr.io/linuxserver/swag:latest -lv 9000 Listening on 0.0.0.0 9000 Connection received on 192.168.1.228 63218 On the unraid machine, run netcat listening on port 9000 then connect from the windows machine. Here we can see that the remote address is seen as 172.17.0.1: root@unraid:~# docker run --rm -it --network mynet -p 9000:9000 --entrypoint /usr/bin/nc lscr.io/linuxserver/swag:latest -lv 9000 Listening on 0.0.0.0 9000 Connection received on 172.17.0.1 63278 What settings do I need to change so that a container with forwarded ports on a user defined bridge network will see the actual remote client IP address and not the NAT'd docker gateway address?
-
-
unRAID 6 NerdPack - CLI tools (iftop, iotop, screen, kbd, etc.)
Yep working fine now, thanks!
-
unRAID 6 NerdPack - CLI tools (iftop, iotop, screen, kbd, etc.)
I'm attempting to install ncurses-terminfo but it just won't install. Get an output that looks like this: Processing Packages... bash-completion-2.8 package up to date, checksum ok. iftop-1.0pre4 package up to date, checksum ok. iotop-0.6 package up to date, checksum ok. iperf-3.1.6 package up to date, checksum ok. lftp-4.8.4 package up to date, checksum ok. mediainfo-17.12 package up to date, checksum ok. Downloading ncurses-terminfo-6.1_20191130-x86_64-1.txz package... ncurses-terminfo-6.1_20191130-x86_64-1.txz package download sucessful! Installing ncurses-terminfo-6.1.20191130 package... perl-5.30.0 package up to date, checksum ok. python3-3.8.1 package up to date, checksum ok. python-2.7.17 package up to date, checksum ok. vim-8.1.0727 package up to date, checksum ok. Cleaning up packages... All packages processed... But ncurses-terminfo then still shows as not installed, there is no .txz file in /boot/config/plugins/NerdPack/packages/6.8 and no added files in /usr/share/terminfo Am I doing something wrong?
dfill
Members
-
Joined
-
Last visited