Tracenji Posted November 6, 2023 Share Posted November 6, 2023 Unraid: 6.12.4 hello, i recently installed unraid on a pc there is a docker application i want to run but in order to access it like i want to i will have to run another docker so i cannot just run with direct access to physical LAN, but i would still like a different physical LAN adress one of the ports of the docker is also used by an existing docker but i do not wish to change any of the ports so how can i create another docker bridge with port mapping to a different physical LAN ip that is not the host ip? (if possible) so if host IP was 192.168.1.100 and the default mapping would be 172.17.0.2:1000 -> 192.168.1.100:1000 how could i make a docker bridge that would be something like 172.18.0.2:1000 -> 192.168.1.150:1000 Quote Link to comment
Solution Tracenji Posted November 6, 2023 Author Solution Share Posted November 6, 2023 (edited) UPDATE: i managed to do it managed to do it using a user script (plugin available in community apps) user script runs at first array start with the command ip addr add 192.168.1.150/24 dev br0 and then i also created a docker network by running this command in the unraid web terminal docker network create --driver=bridge --opt com.docker.network.bridge.host_binding_ipv4=192.168.1.150 --opt com.docker.network.bridge.name=192.168.1.150 192.168.1.150 and now i have a custom network called "192.168.1.150" available in my docker configurations NOTE: the Bridge network that comes with unraid does not bind to a specific IP, that means if a port is used by another docker bridge network then it will fail as the port is already bound, to avoid this, repeat the steps above with the host ip or a different IP, e.g. 192.168.1.200 (i did not test with the hosts ip address but i do not see any reason it would not work) NOTE 2: you may want to reserve the IP addresses you add in your DHCP server (usually your router) so that other devices do not get assigned those IPs, just reserve them to some unused MAC address like 11:11:11:11:11:11 Edited November 6, 2023 by Tracenji added NOTE 2 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.