Goal
Make home Raspberry Pi server accessible from outside with custom domain.Environment
- Raspberry Pi with Raspbian Jessie Lite
- High speed internet at home (e.g. Fios), dynamic IP
- Appropriate ports are open: 80, 443, 23, etc.
- Own domain and access to DNS setting
Steps
1. Get an account at http://freedns.afraid.org/, and set up subdomains2. From your RPi, do this: $ sudo apt-get install ddclient
3. Edit ddclient configuration. Change BOLD strings to match with yours:
$ sudo vi /etc/ddclient.cf
Add these lines:
protocol=freedns
login=[email protected]
password='mypassword'
mysubdomain.mooo.com
At this point, if you don't have own domain, you can just use the subdomain "mysubdomain.mooo.com"
4. Change DNS setting for your custom domain: create new entry for CNAME and set its value to the subdomain. Example, "CNAME Host=www.mydomain.com, Answer=mysubdomain.mooo.com"
5. Set up Port Forwarding in your router: port forwarding to RPi's IP.
Note
ddclient can be used to update OpenDNS also. See, https://support.opendns.com/hc/en-us/articles/227987727
ddclient config example:
use=web, web=myip.dnsomatic.com
ssl=yes
server=updates.opendns.com
protocol=dyndns2
login=myuserid
password='mypassword'
home
No comments:
Post a Comment