@@ -93,7 +93,6 @@ export CF_TUNNEL_NAME=fzryzen
9393export CF_TARGET_DOMAIN=fzryzen.afzalex.com
9494```
9595
96-
9796Prerequisites
9897- ` afzalex.com ` or any other domain is added to Cloudflare
9998- Nameservers are pointing to Cloudflare
@@ -126,17 +125,19 @@ Create the Cloudflared config file
126125export TUNNEL_ID=$( basename ~ /.cloudflared/* .json .json)
127126cat << EOF | envsubst | tee /tmp/cloudflared-config.yml
128127tunnel: ${TUNNEL_ID}
129- credentials-file: /root /.cloudflared/${TUNNEL_ID} .json
128+ credentials-file: ${HOME} /.cloudflared/${TUNNEL_ID} .json
130129
131130ingress:
132- - hostname: $CF_TARGET_DOMAIN
131+ - hostname: ${ CF_TARGET_DOMAIN}
133132 service: http://localhost:80
134133
135134 - service: http_status:404
136135EOF
137136```
138137
139- Copy this config into /etc/cloudflared directory and then install cloudflared service
138+ ** Install service and enable it**
139+
140+ For unix based systems :
140141``` bash
141142sudo mkdir -p /etc/cloudflared
142143sudo cp /tmp/cloudflared-config.yml /etc/cloudflared/config.yml
@@ -145,6 +146,16 @@ sudo systemctl enable cloudflared
145146sudo systemctl start cloudflared
146147```
147148
149+ For macOS :
150+ ``` bash
151+ cp /tmp/cloudflared-config.yml ~ /cloudflared/config.yml
152+ sudo cloudflared service install
153+ ```
154+
155+ To check if it is routing from internet
156+ ``` bash
157+ cloudflared tunnel info fzmacair
158+ ```
148159
149160
150161### EC2 user-data to add web server with web page on 80 port number
0 commit comments