https://github.com/tetreum/local2public
Have a link to your local network using your domain in cloudflare+ipfy
https://github.com/tetreum/local2public
cloudflare ipfy php
Last synced: 6 months ago
JSON representation
Have a link to your local network using your domain in cloudflare+ipfy
- Host: GitHub
- URL: https://github.com/tetreum/local2public
- Owner: tetreum
- License: mit
- Created: 2018-07-29T11:39:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-29T16:34:56.000Z (over 7 years ago)
- Last Synced: 2025-02-09T17:46:08.271Z (about 1 year ago)
- Topics: cloudflare, ipfy, php
- Language: PHP
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# local2public
Have an updated subdomain pointing to your local network cloudflare + ipfy.
This cron will request your router's ip every 5min and update the cloudflare's dns record of your subdomain whenever it changes.
Sort of afraid.org/no-ip.com alternative.
Example:
You have a domain called facebook.com and a linux server in your house that you want to access remotely.
By creating a subdomain, for example myhome.facebook.com and running this script in your server, myhome.facebook.com will be always pointing to your router's ip no matter if you have dynamic ip at home.
# Requirements
- php
- composer (getcomposer.org)
# Setup
1. Create the subdomain entry in cloudflare. It must be Type: A & TTL: 2min or the lowest one possible.
2. Go to cloudflare and grab your (global) api key: https://dash.cloudflare.com/profile
3. Rename `config.demo.php` to `config.php`
4. Edit the config.php data
5. Run `composer install`
6. Setup the cronjob, ex: `*/5 * * * * php /PATH_TO/cron.php >/dev/null 2>&1`