External access to docker contrainer

    • OMV 4.x
    • External access to docker contrainer

      TL;DR need external access to a specific docker container, running on my OMV.

      I have a ghost blog installed in a docker contrainer (192.168.1.149:2368)

      I'm messing around with JAMstack and Netlify to get a static front-end running on GitHub (using my own domain name).

      Essentially, everything else is setup, but Netlify needs the address of where my ghost back-end is located (my docker container) for every time it rebuilds.

      I can't figure out how to give it access through to that container with port-forwarding etc.

      So far, all I have been able to do is get a ddns up and running, which taken me to my router login page.

      NB: using DD-WRT router firmware, so should be able to do just about anything needed. Also have OpenVPN policy routing so all external traffic to OMV (192.168.1.149) goes through VPN.

      Thanks! :cursing:
    • in your dd-wrt router, redirect all traficc to port 2368 to the same port and use IP of your NAS

      eg: if your NAS is 192.168.0.10 redirect 2368 to 192.168.0.10:2368


      PD: This is for a normal connetion, not sure if works ina VPN connection.
      OMV 4.1.11 x64 on a HP T510, 16GB CF as Boot Disk & 32GB SSD 2,5" disk for Data, 4 GB RAM, CPU VIA EDEN X2 U4200 is x64 at 1GHz

      Post: HPT510 SlimNAS ; HOWTO Install Pi-Hole ; HOWTO install MLDonkey ; HOHTO Install ZFS-Plugin ; OMV_OldGUI ; ShellinaBOX ;
      Dockers: MLDonkey ; PiHole ; weTTY
      Videos: @TechnoDadLife
    • raulfg3 wrote:

      in your dd-wrt router, redirect all traficc to port 2368 to the same port and use IP of your NAS

      eg: if your NAS is 192.168.0.10 redirect 2368 to 192.168.0.10:2368


      PD: This is for a normal connetion, not sure if works ina VPN connection.
      No dice on this unfortunately.

      Tried with and without the VPN setup - not sure why it's blocking

      ApplicationProtocolSource NetPort fromIP AddressPort toEnable
      NameTCP UDP BothSource NetPort FromIP AddressPort toEnable
      GhostBoth2368192.168.1.1492368X
    • I could be wrong, but I thought Docker had it's own unique IP? I know when I ipconfig....

      Source Code

      1. docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      2. inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
      3. ether 02:42:eb:17:24:2c txqueuelen 0 (Ethernet)
      4. RX packets 0 bytes 0 (0.0 B)
      5. RX errors 0 dropped 0 overruns 0 frame 0
      6. TX packets 70 bytes 12181 (11.8 KiB)
      7. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      8. enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      9. inet 192.168.1.165 netmask 255.255.255.0 broadcast 192.168.1.255
      10. ether 68:05:ca:2b:de:1c txqueuelen 1000 (Ethernet)
      11. RX packets 326644 bytes 100222063 (95.5 MiB)
      12. RX errors 0 dropped 0 overruns 0 frame 0
      13. TX packets 1374972 bytes 1880194803 (1.7 GiB)
      14. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      15. device interrupt 16 memory 0xf7cc0000-f7ce0000
      16. lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
      17. inet 127.0.0.1 netmask 255.0.0.0
      18. inet6 ::1 prefixlen 128 scopeid 0x10<host>
      19. loop txqueuelen 1000 (Local Loopback)
      20. RX packets 1872 bytes 214191 (209.1 KiB)
      21. RX errors 0 dropped 0 overruns 0 frame 0
      22. TX packets 1872 bytes 214191 (209.1 KiB)
      23. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      24. tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
      25. inet 10.2.11.6 netmask 255.255.255.255 destination 10.2.11.5
      26. unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
      27. RX packets 42871 bytes 55068656 (52.5 MiB)
      28. RX errors 0 dropped 0 overruns 0 frame 0
      29. TX packets 18156 bytes 1374483 (1.3 MiB)
      30. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      31. veth9b73402: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      32. ether 5e:32:3f:68:ea:c1 txqueuelen 0 (Ethernet)
      33. RX packets 0 bytes 0 (0.0 B)
      34. RX errors 0 dropped 0 overruns 0 frame 0
      35. TX packets 70 bytes 12181 (11.8 KiB)
      36. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      Display All
      so I wonder if you were to forward to (in my example..) 172.17.0.1:2368.. if that would work? (I highly doubt it, but I've noticed that in my ipconfig before.

      (Edit: FWIW though, I've forwarded ports or Calibre, which I have running on Docker, and it works fine with just IPaddress:calibre port.)
      Air Conditioners are a lot like PC's... They work great until you open Windows.

    • KM0201 wrote:

      I could be wrong, but I thought Docker had it's own unique IP? I know when I ipconfig....

      Source Code

      1. docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      2. inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
      3. ether 02:42:eb:17:24:2c txqueuelen 0 (Ethernet)
      4. RX packets 0 bytes 0 (0.0 B)
      5. RX errors 0 dropped 0 overruns 0 frame 0
      6. TX packets 70 bytes 12181 (11.8 KiB)
      7. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      8. enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      9. inet 192.168.1.165 netmask 255.255.255.0 broadcast 192.168.1.255
      10. ether 68:05:ca:2b:de:1c txqueuelen 1000 (Ethernet)
      11. RX packets 326644 bytes 100222063 (95.5 MiB)
      12. RX errors 0 dropped 0 overruns 0 frame 0
      13. TX packets 1374972 bytes 1880194803 (1.7 GiB)
      14. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      15. device interrupt 16 memory 0xf7cc0000-f7ce0000
      16. lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
      17. inet 127.0.0.1 netmask 255.0.0.0
      18. inet6 ::1 prefixlen 128 scopeid 0x10<host>
      19. loop txqueuelen 1000 (Local Loopback)
      20. RX packets 1872 bytes 214191 (209.1 KiB)
      21. RX errors 0 dropped 0 overruns 0 frame 0
      22. TX packets 1872 bytes 214191 (209.1 KiB)
      23. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      24. tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
      25. inet 10.2.11.6 netmask 255.255.255.255 destination 10.2.11.5
      26. unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
      27. RX packets 42871 bytes 55068656 (52.5 MiB)
      28. RX errors 0 dropped 0 overruns 0 frame 0
      29. TX packets 18156 bytes 1374483 (1.3 MiB)
      30. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      31. veth9b73402: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      32. ether 5e:32:3f:68:ea:c1 txqueuelen 0 (Ethernet)
      33. RX packets 0 bytes 0 (0.0 B)
      34. RX errors 0 dropped 0 overruns 0 frame 0
      35. TX packets 70 bytes 12181 (11.8 KiB)
      36. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      Display All
      so I wonder if you were to forward to (in my example..) 172.17.0.1:2368.. if that would work? (I highly doubt it, but I've noticed that in my ipconfig before.

      (Edit: FWIW though, I've forwarded ports or Calibre, which I have running on Docker, and it works fine with just IPaddress:calibre port.)
      How are you running ipconfig? I ssh in and altried sheelInABox - ipconfig and ifconfig are both 'command not found'
    • couch_potatozes wrote:

      ipconfig and ifconfig are both 'command not found'
      ipconfig is a windows command. ifconfig has been deprecated. Use ip a (short for ip address show)
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • couch_potatozes wrote:

      KM0201 wrote:

      I could be wrong, but I thought Docker had it's own unique IP? I know when I ipconfig....

      Source Code

      1. docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      2. inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
      3. ether 02:42:eb:17:24:2c txqueuelen 0 (Ethernet)
      4. RX packets 0 bytes 0 (0.0 B)
      5. RX errors 0 dropped 0 overruns 0 frame 0
      6. TX packets 70 bytes 12181 (11.8 KiB)
      7. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      8. enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      9. inet 192.168.1.165 netmask 255.255.255.0 broadcast 192.168.1.255
      10. ether 68:05:ca:2b:de:1c txqueuelen 1000 (Ethernet)
      11. RX packets 326644 bytes 100222063 (95.5 MiB)
      12. RX errors 0 dropped 0 overruns 0 frame 0
      13. TX packets 1374972 bytes 1880194803 (1.7 GiB)
      14. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      15. device interrupt 16 memory 0xf7cc0000-f7ce0000
      16. lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
      17. inet 127.0.0.1 netmask 255.0.0.0
      18. inet6 ::1 prefixlen 128 scopeid 0x10<host>
      19. loop txqueuelen 1000 (Local Loopback)
      20. RX packets 1872 bytes 214191 (209.1 KiB)
      21. RX errors 0 dropped 0 overruns 0 frame 0
      22. TX packets 1872 bytes 214191 (209.1 KiB)
      23. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      24. tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
      25. inet 10.2.11.6 netmask 255.255.255.255 destination 10.2.11.5
      26. unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
      27. RX packets 42871 bytes 55068656 (52.5 MiB)
      28. RX errors 0 dropped 0 overruns 0 frame 0
      29. TX packets 18156 bytes 1374483 (1.3 MiB)
      30. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      31. veth9b73402: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      32. ether 5e:32:3f:68:ea:c1 txqueuelen 0 (Ethernet)
      33. RX packets 0 bytes 0 (0.0 B)
      34. RX errors 0 dropped 0 overruns 0 frame 0
      35. TX packets 70 bytes 12181 (11.8 KiB)
      36. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      Display All


      so I wonder if you were to forward to (in my example..) 172.17.0.1:2368.. if that would work? (I highly doubt it, but I've noticed that in my ipconfig before.

      (Edit: FWIW though, I've forwarded ports or Calibre, which I have running on Docker, and it works fine with just IPaddress:calibre port.)
      How are you running ipconfig? I ssh in and altried sheelInABox - ipconfig and ifconfig are both 'command not found'
      Ok so i get the below when running ip a

      Source Code

      1. 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
      2. link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      3. inet 127.0.0.1/8 scope host lo
      4. valid_lft forever preferred_lft forever
      5. inet6 ::1/128 scope host
      6. valid_lft forever preferred_lft forever
      7. 2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
      8. link/ether d0:50:99:89:ef:77 brd ff:ff:ff:ff:ff:ff
      9. inet 192.168.1.149/24 brd 192.168.1.255 scope global enp3s0
      10. valid_lft forever preferred_lft forever
      11. 3: wlp1s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
      12. link/ether 28:c2:dd:22:5d:e9 brd ff:ff:ff:ff:ff:ff
      13. 4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
      14. link/ether 02:42:af:a8:b2:9d brd ff:ff:ff:ff:ff:ff
      15. inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
      16. valid_lft forever preferred_lft forever
      Display All

      at line 13 - i port-forwarded (like in my earlier post) using the 172.12.0.1 IP, but it's a no-go too, as you expected.

      There must be something else happening here. Even with a policy rounding my OMV server traffic through a VPN, it should still be accessible - it's downloading /uploading data 24/7 afterall. Not sure what I'm missing.