Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Only internal IP address in logs

    Gitea
    reverseproxy
    4
    6
    828
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • yusf
      yusf last edited by girish

      In my app logs, I'm only presented with Docker's internal IP addresses, such as 172.18.0.1 and not ever end users' IPs. This poses various problems for me in maintaining app instances. I know this to be the issue with at least Matrix and Gitea.

      Can this be solved so that real external IPs are shown?

      murgero 1 Reply Last reply Reply Quote 1
      • murgero
        murgero App Dev @yusf last edited by

        @yusf The external ips may be in the cloudron proxy logs on the host itself.

        --
        https://urgero.org
        ~ Professional Nerd. Freelance Programmer. ~
        Matrix: @murgero:urgero.org

        1 Reply Last reply Reply Quote 0
        • nebulon
          nebulon Staff last edited by

          For the app behind the proxy, the reverse proxy sets various headers to preserve that info: https://git.cloudron.io/cloudron/box/-/blob/master/src/nginxconfig.ejs#L153

          See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For

          1 Reply Last reply Reply Quote 0
          • Topic has been marked as a question  nebulon nebulon 
          • girish
            girish Staff last edited by

            If you use apache in your app, you can put something like this in the config:

                LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
                CustomLog "|/bin/cat" proxy
                ErrorLog "|/bin/cat"
            
            1 Reply Last reply Reply Quote 0
            • Topic has been marked as solved  girish girish 
            • Topic has been marked as unsolved  yusf yusf 
            • yusf
              yusf last edited by

              This is not a custom app, this is Gitea.

              girish 1 Reply Last reply Reply Quote 1
              • Moved from Support by  girish girish 
              • girish
                girish Staff @yusf last edited by

                @yusf thanks, fixed in latest package.

                1 Reply Last reply Reply Quote 2
                • Topic has been marked as solved  girish girish 
                • First post
                  Last post
                Powered by NodeBB