{"id":845,"date":"2022-03-31T20:40:16","date_gmt":"2022-03-31T20:40:16","guid":{"rendered":"https:\/\/www.ebnet.us\/?p=845"},"modified":"2022-08-10T19:21:21","modified_gmt":"2022-08-10T23:21:21","slug":"how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker","status":"publish","type":"post","link":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/","title":{"rendered":"How to show real IP of clients in Traefik access.log in Docker"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">If you are running <a href=\"https:\/\/traefik.io\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Traefik<\/strong><\/a> in <a href=\"https:\/\/www.docker.com\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Docker<\/strong><\/a> and you are monitoring incoming traffic you will see all incoming connections are using IP addresses from the Docker ingress network. If you need the real IP of clients in Traefik connecting to your Traefik reverse proxy running in a Docker Swarm environment you will need to publish Traefik&#8217;s entrypoints of your Docker container to the host network.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why I needed to show the real IP of clients in Traefik<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I found a <a href=\"https:\/\/grafana.com\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Grafana<\/strong> <\/a>dashboard that used <strong><a href=\"https:\/\/grafana.com\/oss\/loki\/\" target=\"_blank\" rel=\"noreferrer noopener\">Loki<\/a><\/strong> to scrape Traefik&#8217;s access.log to allow almost real time viewing of connections coming through my Traefik reverse proxy. Unfortunately the <strong><a href=\"https:\/\/grafana.com\/grafana\/dashboards\/13713\" target=\"_blank\" rel=\"noreferrer noopener\">dashboard&#8217;s documentation was written half in Chinese<\/a><\/strong> but after some digging in I managed to get it up and running. I then found all the IP addresses in the logs were internal to Docker.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"533\" src=\"https:\/\/ebnet.local.ebnet.us\/wp-content\/uploads\/2022\/03\/Traefik-Via-Loki-Dashboard-1024x533.png\" alt=\"Traefik-Via-Loki-Dashboard\" class=\"wp-image-842\" srcset=\"https:\/\/www.ebnet.us\/wp-content\/uploads\/2022\/03\/Traefik-Via-Loki-Dashboard-1024x533.png 1024w, https:\/\/www.ebnet.us\/wp-content\/uploads\/2022\/03\/Traefik-Via-Loki-Dashboard-300x156.png 300w, https:\/\/www.ebnet.us\/wp-content\/uploads\/2022\/03\/Traefik-Via-Loki-Dashboard-768x400.png 768w, https:\/\/www.ebnet.us\/wp-content\/uploads\/2022\/03\/Traefik-Via-Loki-Dashboard-1536x800.png 1536w, https:\/\/www.ebnet.us\/wp-content\/uploads\/2022\/03\/Traefik-Via-Loki-Dashboard.png 1803w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Grafana Traefik Via Loki Dashboard<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Traefik access.log behind Docker Ingress Network<\/h2>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<pre class=\"wp-block-code\"><code>{\"ClientAddr\":\"<strong>10.0.0.2<\/strong>:56038\",\"ClientHost\":\"10.0.0.2\",\"ClientPort\":\"56038\",\"ClientUsername\":\"-\",\"DownstreamContentSize\":19,\"DownstreamStatus\":404,\"Duration\":777860,\"OriginContentSize\":19,\"OriginDuration\":67647,\"OriginStatus\":404,\"Overhead\":710213,\"RequestAddr\":\"health.local.ebnet.us\",\"RequestContentSize\":0,\"RequestCount\":1,\"RequestHost\":\"health.local.ebnet.us\",\"RequestMethod\":\"GET\",\"RequestPath\":\"\/socket.io\/?EIO=4\\u0026transport=websocket\",\"RequestPort\":\"-\",\"RequestProtocol\":\"HTTP\/1.1\",\"RequestScheme\":\"https\",\"RetryAttempts\":0,\"StartLocal\":\"2022-03-30T22:20:28.909894281-04:00\",\"StartUTC\":\"2022-03-31T02:20:28.909894281Z\",\"TLSCipher\":\"TLS_CHACHA20_POLY1305_SHA256\",\"TLSVersion\":\"1.3\",\"entryPointName\":\"https\",\"level\":\"info\",\"msg\":\"\",\"time\":\"2022-03-30T22:20:28-04:00\"}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">How to publish your Traefik entrypoints in Docker Swarm<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In your docker-compose file for Traefik, the ports section needs to look like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    ports:\n      - target: 80\n        published: 80\n        mode: host\n      - target: 443\n        published: 443\n        mode: host<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Recycle your Traefik container<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Traefik access.log having entrypoints published to the host network<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>{\"ClientAddr\":\"<strong>192.168.0.34<\/strong>:58622\",\"ClientHost\":\"192.168.0.34\",\"ClientPort\":\"58622\",\"ClientUsername\":\"-\",\"DownstreamContentSize\":0,\"DownstreamStatus\":304,\"Duration\":7366997,\"OriginContentSize\":0,\"OriginDuration\":6389597,\"OriginStatus\":304,\"Overhead\":977400,\"RequestAddr\":\"health.local.ebnet.us\",\"RequestContentSize\":0,\"RequestCount\":23127,\"RequestHost\":\"health.local.ebnet.us\",\"RequestMethod\":\"GET\",\"RequestPath\":\"\/assets\/index.b500f6e0.css\",\"RequestPort\":\"-\",\"RequestProtocol\":\"HTTP\/1.1\",\"RequestScheme\":\"https\",\"RetryAttempts\":0,\"RouterName\":\"uptime-kuma-secure@docker\",\"ServiceAddr\":\"10.0.7.204:3001\",\"ServiceName\":\"uptime-kuma@docker\",\"ServiceURL\":{\"Scheme\":\"http\",\"Opaque\":\"\",\"User\":null,\"Host\":\"10.0.7.204:3001\",\"Path\":\"\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\",\"RawFragment\":\"\"},\"StartLocal\":\"2022-03-31T02:28:21.91697327-04:00\",\"StartUTC\":\"2022-03-31T06:28:21.91697327Z\",\"TLSCipher\":\"TLS_CHACHA20_POLY1305_SHA256\",\"TLSVersion\":\"1.3\",\"entryPointName\":\"https\",\"level\":\"info\",\"msg\":\"\",\"time\":\"2022-03-31T02:28:21-04:00\"}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">If you enabled access logging for Traefik running in Docker check out my post about rotating logs for Docker containers <strong><a href=\"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-rotate-the-traefik-access-log-in-docker-swarm\/\" target=\"_blank\" rel=\"noopener\">here<\/a><\/strong>.<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>If you are running Traefik in Docker and you are monitoring incoming traffic you will see all incoming connections are using IP addresses from the Docker ingress network. If you need the real IP of clients in Traefik connecting to your Traefik reverse proxy running in a Docker Swarm environment you will need to publish&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":843,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[12,25,27],"tags":[9,10,26],"class_list":["post-845","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker","category-software","category-traefik","tag-docker","tag-dockerswarm","tag-traefik"],"featured_image_src":"https:\/\/www.ebnet.us\/wp-content\/uploads\/2022\/03\/Traefik-Logo.webp","author_info":{"display_name":"Ed Brandon","author_link":"https:\/\/www.ebnet.us\/index.php\/author\/bigeb\/"},"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.9 - aioseo.com -->\n\t<meta name=\"description\" content=\"If you are running Traefik in Docker and you are monitoring incoming traffic you will see all incoming connections are using IP addresses from the Docker ingress network. If you need the real IP of clients in Traefik connecting to your Traefik reverse proxy running in a Docker Swarm environment you will need to publish\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Ed Brandon\"\/>\n\t<meta name=\"google-site-verification\" content=\"google3df54d40fcd428c7\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.9\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"EBnet - Tech Everything from Raspberry Pi&#039;s to Playstation 5\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to show real IP of clients in Traefik access.log in Docker - EBnet\" \/>\n\t\t<meta property=\"og:description\" content=\"If you are running Traefik in Docker and you are monitoring incoming traffic you will see all incoming connections are using IP addresses from the Docker ingress network. If you need the real IP of clients in Traefik connecting to your Traefik reverse proxy running in a Docker Swarm environment you will need to publish\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/ebnet.local.ebnet.us\/wp-content\/uploads\/2021\/12\/1881b614309840f89a43c31f57c34eb9.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/ebnet.local.ebnet.us\/wp-content\/uploads\/2021\/12\/1881b614309840f89a43c31f57c34eb9.png\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-03-31T20:40:16+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-08-10T23:21:21+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@EBnetBlog\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to show real IP of clients in Traefik access.log in Docker - EBnet\" \/>\n\t\t<meta name=\"twitter:description\" content=\"If you are running Traefik in Docker and you are monitoring incoming traffic you will see all incoming connections are using IP addresses from the Docker ingress network. If you need the real IP of clients in Traefik connecting to your Traefik reverse proxy running in a Docker Swarm environment you will need to publish\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@EBnetBlog\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.ebnet.us\/wp-content\/uploads\/2022\/03\/Traefik-Logo.webp\" \/>\n\t\t<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t\t<meta name=\"twitter:data1\" content=\"Ed Brandon\" \/>\n\t\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/2022\\\/03\\\/31\\\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\\\/#blogposting\",\"name\":\"How to show real IP of clients in Traefik access.log in Docker - EBnet\",\"headline\":\"How to show real IP of clients in Traefik access.log in Docker\",\"author\":{\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/author\\\/bigeb\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.ebnet.us\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/Traefik-Logo.webp\",\"width\":500,\"height\":280,\"caption\":\"Traefik Logo\"},\"datePublished\":\"2022-03-31T20:40:16-04:00\",\"dateModified\":\"2022-08-10T19:21:21-04:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/2022\\\/03\\\/31\\\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/2022\\\/03\\\/31\\\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\\\/#webpage\"},\"articleSection\":\"Docker, Software, Traefik, Docker, Docker Swarm, Traefik\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/2022\\\/03\\\/31\\\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ebnet.us#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.ebnet.us\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/category\\\/software\\\/#listItem\",\"name\":\"Software\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/category\\\/software\\\/#listItem\",\"position\":2,\"name\":\"Software\",\"item\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/category\\\/software\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/category\\\/software\\\/docker\\\/#listItem\",\"name\":\"Docker\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ebnet.us#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/category\\\/software\\\/docker\\\/#listItem\",\"position\":3,\"name\":\"Docker\",\"item\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/category\\\/software\\\/docker\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/2022\\\/03\\\/31\\\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\\\/#listItem\",\"name\":\"How to show real IP of clients in Traefik access.log in Docker\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/category\\\/software\\\/#listItem\",\"name\":\"Software\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/2022\\\/03\\\/31\\\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\\\/#listItem\",\"position\":4,\"name\":\"How to show real IP of clients in Traefik access.log in Docker\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/category\\\/software\\\/docker\\\/#listItem\",\"name\":\"Docker\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/#person\",\"name\":\"Ed Brandon\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/2022\\\/03\\\/31\\\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/20d736232d61bbd38f16ad2bd010efbb7fa62d271bfd4dcf054ba0fe5b36a63a?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Ed Brandon\"},\"sameAs\":[\"https:\\\/\\\/twitter.com\\\/EBnetBlog\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/author\\\/bigeb\\\/#author\",\"url\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/author\\\/bigeb\\\/\",\"name\":\"Ed Brandon\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/2022\\\/03\\\/31\\\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/20d736232d61bbd38f16ad2bd010efbb7fa62d271bfd4dcf054ba0fe5b36a63a?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Ed Brandon\"},\"sameAs\":[\"https:\\\/\\\/twitter.com\\\/EBnetBlog\"]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/2022\\\/03\\\/31\\\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\\\/#webpage\",\"url\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/2022\\\/03\\\/31\\\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\\\/\",\"name\":\"How to show real IP of clients in Traefik access.log in Docker - EBnet\",\"description\":\"If you are running Traefik in Docker and you are monitoring incoming traffic you will see all incoming connections are using IP addresses from the Docker ingress network. If you need the real IP of clients in Traefik connecting to your Traefik reverse proxy running in a Docker Swarm environment you will need to publish\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/2022\\\/03\\\/31\\\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/author\\\/bigeb\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/author\\\/bigeb\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.ebnet.us\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/Traefik-Logo.webp\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/2022\\\/03\\\/31\\\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\\\/#mainImage\",\"width\":500,\"height\":280,\"caption\":\"Traefik Logo\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/index.php\\\/2022\\\/03\\\/31\\\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\\\/#mainImage\"},\"datePublished\":\"2022-03-31T20:40:16-04:00\",\"dateModified\":\"2022-08-10T19:21:21-04:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/#website\",\"url\":\"https:\\\/\\\/www.ebnet.us\\\/\",\"name\":\"EBnet\",\"description\":\"Tech Everything from Raspberry Pi's to Playstation 5\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.ebnet.us\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to show real IP of clients in Traefik access.log in Docker - EBnet","description":"If you are running Traefik in Docker and you are monitoring incoming traffic you will see all incoming connections are using IP addresses from the Docker ingress network. If you need the real IP of clients in Traefik connecting to your Traefik reverse proxy running in a Docker Swarm environment you will need to publish","canonical_url":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"google3df54d40fcd428c7","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/#blogposting","name":"How to show real IP of clients in Traefik access.log in Docker - EBnet","headline":"How to show real IP of clients in Traefik access.log in Docker","author":{"@id":"https:\/\/www.ebnet.us\/index.php\/author\/bigeb\/#author"},"publisher":{"@id":"https:\/\/www.ebnet.us\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/www.ebnet.us\/wp-content\/uploads\/2022\/03\/Traefik-Logo.webp","width":500,"height":280,"caption":"Traefik Logo"},"datePublished":"2022-03-31T20:40:16-04:00","dateModified":"2022-08-10T19:21:21-04:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/#webpage"},"isPartOf":{"@id":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/#webpage"},"articleSection":"Docker, Software, Traefik, Docker, Docker Swarm, Traefik"},{"@type":"BreadcrumbList","@id":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.ebnet.us#listItem","position":1,"name":"Home","item":"https:\/\/www.ebnet.us","nextItem":{"@type":"ListItem","@id":"https:\/\/www.ebnet.us\/index.php\/category\/software\/#listItem","name":"Software"}},{"@type":"ListItem","@id":"https:\/\/www.ebnet.us\/index.php\/category\/software\/#listItem","position":2,"name":"Software","item":"https:\/\/www.ebnet.us\/index.php\/category\/software\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.ebnet.us\/index.php\/category\/software\/docker\/#listItem","name":"Docker"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.ebnet.us#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.ebnet.us\/index.php\/category\/software\/docker\/#listItem","position":3,"name":"Docker","item":"https:\/\/www.ebnet.us\/index.php\/category\/software\/docker\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/#listItem","name":"How to show real IP of clients in Traefik access.log in Docker"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.ebnet.us\/index.php\/category\/software\/#listItem","name":"Software"}},{"@type":"ListItem","@id":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/#listItem","position":4,"name":"How to show real IP of clients in Traefik access.log in Docker","previousItem":{"@type":"ListItem","@id":"https:\/\/www.ebnet.us\/index.php\/category\/software\/docker\/#listItem","name":"Docker"}}]},{"@type":"Person","@id":"https:\/\/www.ebnet.us\/#person","name":"Ed Brandon","image":{"@type":"ImageObject","@id":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/20d736232d61bbd38f16ad2bd010efbb7fa62d271bfd4dcf054ba0fe5b36a63a?s=96&d=mm&r=g","width":96,"height":96,"caption":"Ed Brandon"},"sameAs":["https:\/\/twitter.com\/EBnetBlog"]},{"@type":"Person","@id":"https:\/\/www.ebnet.us\/index.php\/author\/bigeb\/#author","url":"https:\/\/www.ebnet.us\/index.php\/author\/bigeb\/","name":"Ed Brandon","image":{"@type":"ImageObject","@id":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/20d736232d61bbd38f16ad2bd010efbb7fa62d271bfd4dcf054ba0fe5b36a63a?s=96&d=mm&r=g","width":96,"height":96,"caption":"Ed Brandon"},"sameAs":["https:\/\/twitter.com\/EBnetBlog"]},{"@type":"WebPage","@id":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/#webpage","url":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/","name":"How to show real IP of clients in Traefik access.log in Docker - EBnet","description":"If you are running Traefik in Docker and you are monitoring incoming traffic you will see all incoming connections are using IP addresses from the Docker ingress network. If you need the real IP of clients in Traefik connecting to your Traefik reverse proxy running in a Docker Swarm environment you will need to publish","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.ebnet.us\/#website"},"breadcrumb":{"@id":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/#breadcrumblist"},"author":{"@id":"https:\/\/www.ebnet.us\/index.php\/author\/bigeb\/#author"},"creator":{"@id":"https:\/\/www.ebnet.us\/index.php\/author\/bigeb\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/www.ebnet.us\/wp-content\/uploads\/2022\/03\/Traefik-Logo.webp","@id":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/#mainImage","width":500,"height":280,"caption":"Traefik Logo"},"primaryImageOfPage":{"@id":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/#mainImage"},"datePublished":"2022-03-31T20:40:16-04:00","dateModified":"2022-08-10T19:21:21-04:00"},{"@type":"WebSite","@id":"https:\/\/www.ebnet.us\/#website","url":"https:\/\/www.ebnet.us\/","name":"EBnet","description":"Tech Everything from Raspberry Pi's to Playstation 5","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.ebnet.us\/#person"}}]},"og:locale":"en_US","og:site_name":"EBnet - Tech Everything from Raspberry Pi's to Playstation 5","og:type":"article","og:title":"How to show real IP of clients in Traefik access.log in Docker - EBnet","og:description":"If you are running Traefik in Docker and you are monitoring incoming traffic you will see all incoming connections are using IP addresses from the Docker ingress network. If you need the real IP of clients in Traefik connecting to your Traefik reverse proxy running in a Docker Swarm environment you will need to publish","og:url":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/","og:image":"https:\/\/ebnet.local.ebnet.us\/wp-content\/uploads\/2021\/12\/1881b614309840f89a43c31f57c34eb9.png","og:image:secure_url":"https:\/\/ebnet.local.ebnet.us\/wp-content\/uploads\/2021\/12\/1881b614309840f89a43c31f57c34eb9.png","article:published_time":"2022-03-31T20:40:16+00:00","article:modified_time":"2022-08-10T23:21:21+00:00","twitter:card":"summary_large_image","twitter:site":"@EBnetBlog","twitter:title":"How to show real IP of clients in Traefik access.log in Docker - EBnet","twitter:description":"If you are running Traefik in Docker and you are monitoring incoming traffic you will see all incoming connections are using IP addresses from the Docker ingress network. If you need the real IP of clients in Traefik connecting to your Traefik reverse proxy running in a Docker Swarm environment you will need to publish","twitter:creator":"@EBnetBlog","twitter:image":"https:\/\/www.ebnet.us\/wp-content\/uploads\/2022\/03\/Traefik-Logo.webp","twitter:label1":"Written by","twitter:data1":"Ed Brandon","twitter:label2":"Est. reading time","twitter:data2":"2 minutes"},"aioseo_meta_data":{"post_id":"845","title":null,"description":"#post_content","keywords":[],"keyphrases":{"focus":{"keyphrase":"real IP of clients in Traefik","score":75,"analysis":{"keyphraseInTitle":{"title":"Focus keyphrase in SEO title","description":"Focus keyphrase found in SEO title.","score":9,"maxScore":9,"error":0},"keyphraseInDescription":{"title":"Focus keyphrase in meta description","description":"Focus keyphrase found in meta description.","score":9,"maxScore":9,"error":0},"keyphraseLength":{"title":"Focus keyphrase length","description":"Focus keyphrase is slightly long. Try to make it shorter.","score":6,"maxScore":9,"error":1,"length":6},"keyphraseInURL":{"title":"Focus keyphrase in URL","description":"Focus keyphrase used in the URL.","score":5,"maxScore":5,"error":0},"keyphraseInIntroduction":{"title":"Focus keyphrase in introduction","description":"Your Focus keyphrase appears in the first paragraph. Well done!","score":9,"maxScore":9,"error":0},"keyphraseInSubHeadings":{"title":"Focus keyphrase in Subheadings","description":"Use more focus keyphrases in your H2 and H3 subheadings!","score":3,"maxScore":9,"error":1},"keyphraseInImageAlt":{"title":"Focus keyphrase in image alt attributes","description":"Focus keyphrase not found in image alt attribute(s). Add an image with your Focus keyphrase as alt text.","score":3,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"summary_large_image","twitter_image_type":"featured","twitter_image_url":"https:\/\/www.ebnet.us\/wp-content\/uploads\/2022\/03\/Traefik-Logo.webp","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"Article","defaultPostTypeGraph":""},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"},\"blockGraphs\":[]}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2022-03-31 20:40:24","updated":"2025-10-01 03:14:19","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.ebnet.us\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.ebnet.us\/index.php\/category\/software\/\" title=\"Software\">Software<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.ebnet.us\/index.php\/category\/software\/docker\/\" title=\"Docker\">Docker<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to show real IP of clients in Traefik access.log in Docker\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.ebnet.us"},{"label":"Software","link":"https:\/\/www.ebnet.us\/index.php\/category\/software\/"},{"label":"Docker","link":"https:\/\/www.ebnet.us\/index.php\/category\/software\/docker\/"},{"label":"How to show real IP of clients in Traefik access.log in Docker","link":"https:\/\/www.ebnet.us\/index.php\/2022\/03\/31\/how-to-show-real-ip-of-clients-in-traefik-access-log-in-docker\/"}],"_links":{"self":[{"href":"https:\/\/www.ebnet.us\/index.php\/wp-json\/wp\/v2\/posts\/845","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ebnet.us\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ebnet.us\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ebnet.us\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ebnet.us\/index.php\/wp-json\/wp\/v2\/comments?post=845"}],"version-history":[{"count":2,"href":"https:\/\/www.ebnet.us\/index.php\/wp-json\/wp\/v2\/posts\/845\/revisions"}],"predecessor-version":[{"id":1230,"href":"https:\/\/www.ebnet.us\/index.php\/wp-json\/wp\/v2\/posts\/845\/revisions\/1230"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ebnet.us\/index.php\/wp-json\/wp\/v2\/media\/843"}],"wp:attachment":[{"href":"https:\/\/www.ebnet.us\/index.php\/wp-json\/wp\/v2\/media?parent=845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ebnet.us\/index.php\/wp-json\/wp\/v2\/categories?post=845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ebnet.us\/index.php\/wp-json\/wp\/v2\/tags?post=845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}