This guide explains how to modify the local IP address that your Cloudflare Tunnel service connects to on both Windows and Linux systems.
Windows Configuration
To change the IP address that your Cloudflare Tunnel service connects to locally on Windows:
-
Locate your Cloudflare configuration file, typically found at:
%USERPROFILE%\.cloudflared\config.yml(in your user directory)- Or a custom location if you specified one during setup
-
Edit this configuration file with a text editor (run as administrator):
notepad %USERPROFILE%\.cloudflared\config.yml -
Find the
ingresssection which specifies where your traffic is routed. It will look something like:ingress: - hostname: yourdomain.com service: http://127.0.0.1:8000 - service: http_status:404 -
Change the IP address in the
serviceline to your desired IP. For example:ingress: - hostname: yourdomain.com service: http://192.168.1.100:8000 # Change to your new IP - service: http_status:404 -
Save the file
-
Restart the Cloudflare Tunnel service:
- If running as a Windows service:
net stop cloudflared net start cloudflared - If running via Task Scheduler or manually, you’ll need to stop and restart the process
- If running as a Windows service:
-
Verify the change by checking the logs:
cloudflared tunnel info
Linux Configuration
To modify a Cloudflare locally managed tunnel service on Linux:
- Find your tunnel configuration file location. It’s typically in one of these locations:
/etc/cloudflared/config.yml~/.cloudflared/config.yml/usr/local/etc/cloudflared/config.yml(on macOS) If not sure of which config file, run :
sudo systemctl status cloudflaredThen check the config file :

-
Edit the configuration file with your preferred text editor:
sudo nano /etc/cloudflared/config.yml -
Find and modify the
ingresssection with your new IP address:ingress: - hostname: your-domain.com service: http://192.168.1.100:8000 # Change this IP - hostname: another-domain.com service: http://192.168.1.100:3000 # Change this IP - service: http_status:404 -
Save the file after making your changes.
-
Restart the cloudflared service:
# For systemd-based systems (most modern Linux): sudo systemctl restart cloudflared # For older init.d systems: sudo service cloudflared restart -
Verify the changes:
sudo cloudflared tunnel info your-tunnel-id -
Check the logs for any errors:
sudo journalctl -u cloudflared.service
Enable routing for the ingress
Then you need to enable the routing by running :
cloudflared tunnel route dns home.lan <<added url>>
Advanced Configuration Options
For more advanced configurations, you can also:
-
Add path-based routing:
ingress: - hostname: yourdomain.com path: /api/* service: http://192.168.1.100:8000 - hostname: yourdomain.com service: http://192.168.1.101:3000 -
Configure load balancing between multiple services:
ingress: - hostname: yourdomain.com service: http://192.168.1.100:8000, http://192.168.1.101:8000 -
Add authentication:
ingress: - hostname: yourdomain.com service: http://192.168.1.100:8000 originRequest: basicAuth: - username: user password: pass
Remember that after any configuration change, you need to restart the cloudflared service for changes to take effect.