Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Help about MediaWiki
FUTO
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Introduction to a Self Managed Life: a 13 hour & 28 minute presentation by FUTO software
(section)
Main Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= '''Setting Up FreeDNS for Dynamic DNS''' = <span id="why-do-you-need-dynamic-dns"></span> == Why Do You Need Dynamic DNS? == '''Your IP address changes.''' Your IP address is like your home address or phone number. You want this to be static - as in, doesn’t change. Imagine if all of the road names and highway exits changed each day, or if your friend’s phone number changed every day. This would be a mess. How would you know who to call? It would be very confusing. This is how it is when you have a dynamic IP. Most of you setting up a home server likely have a residential internet plan from providers like Spectrum, AT&T, or Verizon. Unlike professional hosting services with static IPs, residential plans assign dynamic IP addresses that change as often as the relationship partners of people with borderline personality disorder. This can be a problem when you want to access your home network remotely. What if you had a speed dial button that automatically kept track of that friend’s changing number, and just allowed you to reach your friend every time you pressed on their name? That’s how a dynamic DNS works. Even if you DO manage to memorize 33.84.182.1, imagine having to memorize a new number every week. Or ''every day!'' And what if it changes in the ''middle of the day?'' Imagine having to check your IP address every day, or calling home & going ''“hey honey, can you go to whatismyip.com and give me the number so I can add something to my calendar? Thanks!”'' That would be horrible. What you want to do is go to ''chrisserver.mooo.com'' or ''mysite.ddns.net'' and it takes you right to your server, every time. This is possible because someone else can do the work of keeping track of your router’s IP address and assigning it to that domain name. Or, something. That thing is a '''dynamic DNS provider.''' This is where '''Dynamic DNS''' comes in handy. It automatically updates a friendly hostname to point to your current IP address, so you can always access your home network using a consistent address. <span id="setting-up-freedns"></span> == Setting Up FreeDNS == <span id="step-1-register-on-freedns"></span> === Step 1: Register on FreeDNS === We’re going to use a service called '''FreeDNS'''. It’s free, easy to use, and even has some fun domain options. <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxaty_tmp_4729b2e6.png File:lu55028jxaty_tmp_45e15cd2.png File:lu55028jxaty_tmp_7c63c31c.png File:lu55028jxaty_tmp_9cd59f27.png File:lu55028jxaty_tmp_684ec372.png </gallery> <span id="create-a-freedns-account"></span> ==== 1.1 Create a FreeDNS account ==== # '''Visit FreeDNS:''' Go to [http://freedns.afraid.org/ freedns.afraid.org]. # '''Register:''' Click on “Sign up Free” in the lower center of the page. # '''Fill out form:''' Fill in the required fields (username, password, and email) and click “Create Account”. # '''Verify your account''' by clicking the link in the confirmation email. <span id="log-into-freedns-create-subdomain"></span> ==== 1.2 Log into FreeDNS & create subdomain ==== Continue with the steps to set up your subdomain as needed. This is going to be the “website name” we associate with our home server internet connection. When you visit <code>rossmanngroup.com</code>, this actually means <code>208.113.140.53</code>. When you type ''[http://rossmanngroup.com/ http://rossmanngroup.com]'' in your browser, you’re asking your browser to go to <code>208.113.140.53</code> and knock on port 80 to serve us a website. When you type <code>https://rossmanngroup.com</code> in your browser, you’re saying we’re going to <code>208.113.140.53</code> and knocking on port 443 to be served a website with https/ssl. The '''subdomain''' enclosed in red in the screenshot above is the '''first part''' of the website name, and the '''domain''' enclosed in green is the '''second part''' of the website name. The '''destination''' enclosed in blue is where our combined website name leads us. So, <code>louishomeserver.chickenkiller.com</code> in the configuration above, would lead us to <code>8.8.8.8</code> # After clicking the activation link from the FreeDNS email, you should be immediately logged in. You should save the username & password they gave you in a password manager. # '''Add a New Subdomain:''' Once logged in, click on “Add a subdomain” in the middle of the screen from the main menu. Or, click Subdomains on the left side menu. # Fill out the fields: ## '''Subdomain:''' Choose a custom name (e.g., “louishomeserver”). That’s the part I circled in red in my screenshot above. ## '''Domain:''' Select one of the available free domains (e.g., <code>chickenkiller.com</code>). This is the green field in my screenshot above. '''You can get your own pretty, custom named .com address, but you’ll have to pay for it.''' ## '''Destination:''' Here’s the trick - put in a WRONG IP address on purpose (e.g., <code>8.8.8.8</code>). This will help us confirm if our setup is working later. # The entire point of this is for our router to constantly ''update'' FreeDNS by telling it what our IP address is. If we put what our IP address is ''RIGHT NOW'' in this field, we won’t know for sure if '''pfSense''' is working properly with FreeDNS. We’d have to debug it through log files. Ew. # Click “Save” to create your hostname. <blockquote>'''NOTE:''' Setting an incorrect initial IP address lets us test that pfSense is correctly updating the dynamic DNS entry. This diagnostic step is an important one; screw things up & make sure that the system you put into place to auto-fix-it fixes it. This is far less dangerous than the alternative, which is “assuming that it works.” </blockquote> <span id="get-the-update-url-from-freedns"></span> ==== 1.3 Get the update URL from FreeDNS ==== The update URL is the URL '''pfSense''' will access to tell FreeDNS that your domain name’s IP address has changed & should change to the IP that your router is accessing that FreeDNS URL from. # After saving, click “Dynamic DNS” from the upper left menu of choices. # You’ll see your new subdomain at the bottom. # Right-click on the “Direct URL” link next to your hostname and copy the link address. # This URL is how we will update our IP address automatically. '''DO NOT SHARE THIS WITH ANYONE OR THEY WILL BE ABLE TO MESS WITH YOU ENDLESSLY BY CHANGING THE IP THAT YOUR NEW WEBSITE NAME ATTACHES TO AWAY FROM YOUR SERVER!!''' <blockquote>'''NOTE:''' The Direct URL contains what is like a “password” necessary for updating your dynamic DNS record. Keep this URL secure and don’t share it publicly unless you want your dynamic dns domain name redirecting to goatse </blockquote> <span id="leave-freedns-page-open-make-sure-it-has-the-wrong-ip-for-you."></span> ==== 1.4 Leave FreeDNS page open & make sure it has the WRONG IP for you. ==== # Either the ''[https://freedns.afraid.org/dynamic/ dynamic DNS page on FreeDNS]'' OR the ''[https://freedns.afraid.org/subdomain/ subdomains page on FreeDNS]''. Make sure the IP address is as we entered before, which is <code>8.8.8.8</code>. # '''IT IS IMPORTANT THAT THIS IP ADDRESS NOT BE YOUR IP ADDRESS! WE WANT IT TO BE WRONG!''' # Make sure it is still set to the <code>8.8.8.8</code> I told you to set it to before. # If it is not, set it to <code>8.8.8.8</code>. # Reload both pages. Still <code>8.8.8.8</code>? Good. # We want this to be wrong – it changing from “wrong” to “not wrong” when we finish our work will mean that our setup works. '''Why are we doing things this way?''' It takes an insignificant amount of extra time to do things like this, as a check against everything; from software glitches to my own carelessness and absent-mindedness. Starting with the assumption that nothing works properly allows us to figure out at the very beginning if everything has been configured properly. Starting with the assumption that nothing works will allow us to figure out if our system ACTUALLY works BEFORE WE NEED IT TO WORK!! You’ll see when we are testing certain features and functionalities and software like syncthing later that this comes in very handy. In the video, a connection will work & have a green checkbox the first time, but local discovery will not work the second time, even though the server & client IPs remain unchanged. NEVER ASSUME A FIX WORKS WITHOUT BREAKING THE THING IT IS SUPPOSED TO FIX AND SEEING WHAT IT DOES. Assume that nothing works, especially your own brain, and you will create systems that guard against much more than your own human error! <span id="step-2-configuring-pfsense-for-dynamic-dns"></span> == Step 2: Configuring pfSense for Dynamic DNS == <gallery mode="packed-hover" heights=250 widths=400 perrow=2> File:lu55028jxaty_tmp_a6b5fa5b.png File:lu55028jxaty_tmp_8b618542.png File:lu55028jxaty_tmp_be361b57.png File:lu55028jxaty_tmp_a9a56361.png </gallery> pfSense has to talk to FreeDNS regularly to tell it our IP. <span id="log-into-pfsense"></span> ==== 2.1 Log into pfSense ==== Open the pfSense web interface and log in, at [https://192.168.5.1/ https://192.168.5.1] or [https://pfsense.home.arpa/ https://pfsense.home.arpa] <span id="enter-dynamic-dns-settings"></span> ==== 2.2 Enter Dynamic DNS settings ==== In the pfSense dashboard, there is a menu on the top. Go to <code>Services > Dynamic DNS</code>. <span id="enter-dynamic-dns-entry"></span> ==== 2.3 Enter Dynamic DNS entry ==== # Click the “+ Add” button to add a new entry. # '''Configure the Settings:''' #* '''Service Type:''' Select “Custom” from the dropdown. This might seem counterintuitive since “freedns” exists as an option in this dropdown menu, but trust me here. You trust me… right? This is the green box in the screenshot I provided above. #* '''Interface to Monitor:''' Select <code>WAN</code> (your external internet connection), this is the part circled in purple above. # '''Interface to send update from:''' Select WAN, the part circled in purple above. # '''HTTP API DNS Options:''' I check '''“Force IPv4 DNS resolution”''' because I have been scarred by my residential internet service provider’s issues with IPv6 before Spectrum bought Time Warner Cable. You don’t have to check this, but I check it because I hate IPv6 & have it turned off entirely in my own setup. I shouldn’t be passing my prejudices onto my children. But here I am passing this one onto you :’( # '''Update URL:''' Paste the Direct URL you copied from FreeDNS. Everything after the question mark in this URL is like your password and username combined. IF YOU ARE USING CLOUDFLARE, you need to use your Zone ID as the username and the token you just created (with the Zone.DNS - Edit permission) as the password. Otherwise, if you use the token alone, the status will always appear green, but you won’t be able to connect. You might end up spending four hours, like I did, debugging all sorts of issues until you finally find the answer in a four-year-old Reddit post. Also, make sure you disable proxy on cloudflare. # '''Max Cache Age:''' When will this run? By default, this runs when an update is forced by you or when the router notices the WAN address (the IP address your ISP assigned to you) has changed. I see no harm in having it update once per day. If there’s any sort of stupid bug or issue or crap where it tried to update & failed because the wind was blowing the wrong day, packet loss, etc… It costs literally nothing to do this, we’re in 2024, even people in the middle of nowhere have 768/128k DSL… There is zero downside to setting this to check at the minimum allowed interval, of once per day. ''“Inspect what you expect”'' as my stepmom would say, who was director of the Brookfield library. :) She could tell you firsthand that….. Nothing you expect people (OR COMPUTERS) to do, will they actually do. # '''Description:''' Add something like “FreeDNS IP Update” to remember what this is for. # '''Save the Configuration:''' Click “Save and force update” to store your Dynamic DNS settings. '''If it went well''', the two areas I circled in red above should look similar to mine. A green checkmark under “status”, and the “cached IP” should be your actual IP address that you see when you go to a site like [https://www.whatismyip.com/ whatismyip.com] <span id="step-3-see-if-dynamic-dns-actually-works"></span> == Step 3: See if Dynamic DNS actually works == We purposely put an incorrect IP of <code>8.8.8.8</code> in there rather than our real IP address to make sure this actually works. Now we’re going to see what happens when we try to get it to work. # Go to the pages I had you keep open before, the ''[https://freedns.afraid.org/dynamic/ dynamic DNS page on FreeDNS]'' OR the ''[https://freedns.afraid.org/subdomain/ subdomains page on FreeDNS]''. # The IP was <code>8.8.8.8</code> before. Has it changed to the IP address that you see when you visit [https://whatismyip.com whatismyip.com], that is the WAN address in '''pfSense'''? If it is, you did good. # '''Another way: Force an IP Change:''' # Disconnect and reconnect your home internet connection to force your ISP to assign a new IP address. ## You can do this by rebooting your modem or temporarily disconnecting your internet connection. ## '''Sometimes, you may not be able to get a new IP, and that’s ok!''' ## Sometimes, you can’t get a new IP from your ISP immediately. # As long as you input an incorrect IP address into the FreeDNS field for your subdomain when adding your subdomain to FreeDNS, and you saw it change to your WAN IP when you set up FreeDNS dynamic DNS in '''pfSense''', you are fine. <span id="verify-dns-resolution"></span> === Verify DNS Resolution === To make sure your new hostname resolves to your home IP address, perform a DNS lookup from any device: <ol style="list-style-type: decimal;"> <li><p>'''Open a Terminal or Command Prompt:'''</p> <ul> <li>On Linux or macOS, open Terminal.</li> <li>On Windows, open Command Prompt.</li></ul> </li> <li><p>'''Run an <code>nslookup</code> Command:'''</p> <pre>nslookup louishomeserver.chickenkiller.com</pre></li></ol> Replace <code>louishomeserver.chickenkiller.com</code> with your actual hostname. <ol start="3" style="list-style-type: decimal;"> <li><p>'''Verify the Result:'''</p> <ul> <li>The output should show your current public IP address associated with your hostname.</li> <li>This confirms that your dynamic DNS is working correctly.</li> <li>You could also just use <code>ping</code>.</li></ul> <pre>ping louishomeserver.chickenkiller.com</pre></li></ol> Does it ping your IP address? You’re good. <span id="why-this-setup-is-important"></span> === Why This Setup Is Important === With this dynamic DNS setup, you no longer have to remember or manually track your public IP address, even when it changes. By using a hostname like <code>louishomeserver.chickenkiller.com</code> you can always access your home network remotely, no matter where you are or how often Spectrum goes down & changes your IP on you. This is useful for accessing home servers or services from outside your network via OpenVPN (next section!). '''pfSense''' Dynamic DNS service with FreeDNS makes sure that my chosen hostname always points to my current IP address. No matter how often my IP changes, I don’t have to change configuration settings in my programs. <span id="openvpn-setting-up-secure-access-from-anywhere"></span>
Summary:
Please note that all contributions to FUTO may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
FUTO:Copyrights
for details).
Do not submit copyrighted work without permission!
To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:
Cancel
Editing help
(opens in new window)