3 ms·
Can you do a quick write up about how to do this? As a web developer, I feel like I should know how to host my own website from my own machine, but I've always
by ollerac 7y ago
Can you do a quick write up about how to do this? As a web developer, I feel like I should know how to host my own website from my own machine, but I've always struggled to get all the right steps in place. It'd be nice to hear from someone more experienced, so I can make sure to do it correctly!
- icebraining 7y agoEssentially you write a script in any language that: 1) checks what's your current IP (an easy way is to do a GET request to http://icanhazip.com/ http://icanhazip.com/, available thanks to Red Hat engineer Major Hayden) 2) checks what was the last IP you sent to Cloudflare (saved in a text file on your disk or something like data) 3) if they are different, send a PUT request to the Cloudflare API with the new IP: https://api.cloudflare.com/#dns-records-for-a-zone-update-dns-record https://api.cloudflare.com/#dns-records-for-a-zone-update-dn... 4) Then save that new IP in the text file, so you can check next time Finally, you edit your crontab to run that script every few hours or so.
- baud147258 7y agoI've checked icanhazip.com and it's not returning the same ip as the one from ipconfig. What does it mean? Note I know nothing how networks work and that I'm in a corporate network
- amdavidson 7y agoYour corporate network is using network address translation (NAT) to map an external address, shown on icanhazip.com, to a local network address, shown in ipconfig. You likely share this external address with many other users and mapping services to it will be challenging without having access to the routing/forwarding configuration. https://en.wikipedia.org/wiki/Network_address_translation https://en.wikipedia.org/wiki/Network_address_translation
- baud147258 7y agoOkay, thank you for this information.