Learn New Skills

Discover my collection of detailed guides, coarses, and tutorials to help you learn new skills and expand your knowledge.

Important Disclaimers

Please read all of the following disclaimers carefully before using this guide or making any changes to your equipment. The information provided is intended to assist with configuration and troubleshooting, but modifications to your devices carry inherent risks. Ensure you understand each disclaimer and the potential consequences before proceeding with any actions.

Guide: Setting Up Google Fiber Static IP Blocks On UniFi Equipment
This guide will walk you through the process of configuring your UniFi equipment to utilize Google Fiber static IP blocks.
Prerequisites
  • An SSH client for accessing your UniFi equipment. Common options include:
    • PuTTY (Windows)
    • Terminal (Built into macOS and Linux)
  • Google Fiber Service:
    • Active Google Fiber business subscription (Sign up here)
    • Static IP block assignment from Google Fiber
    • Google Fiber Router
  • UniFi Controller

This guide has been tested and verified to work with the UniFi controllers listed in the "Tested Hardware" section below.

Step 1: Configure Your Equipment

Setting Google Fiber Router to Bridge Mode

Before configuring your UniFi controller, you will need to set your Google Fiber router into Bridge mode. This allows your UniFi controller to handle routing functions for your connection.

Warning: Setting up Bridge mode will disable all routing functions on your Google Fiber router. This mode will also disable WiFi on your Google Fiber router.
  1. Access your Google Fiber account:
  2. Navigate to "Use bridge mode":
    • Click on the "Network" tab on the left
    • Select the "Edit router settings" button
    • Click on the "Router" tab on the left
  3. Enable the "Use bridge mode" option:
  4. Restart your Google Fiber router:
    • The router will need to be restarted to apply the changes
    • This process typically takes 3-5 minutes

Setting Up Static IP Block on UniFi Controller

Now that your Google Fiber router is in Bridge mode, you will need to configure your UniFi controller to use the static IP block:

  1. Log into your UniFi Controllers User Interface
    • Open a web browser and navigate to your controller's IP address (eg. 192.168.0.1)
    • Log in with your administrator credentials
  2. Navigate to Internet Settings:
    • Click on "Settings" in the left sidebar
    • Select "Internet" from the left menu
    • Select your WAN connection at the top
  3. Enter Static IP Information
    • Name: Google Fiber Business
    • IPv4 Connection: Static IP
    • IPv4 Address: Google Fiber Primary IP Address (Not one from your static IP block)
    • Subnet Mask: Provided By Google Fiber
    • Gateway IP: Provided By Google Fiber
    • Additional IP Addresses:
      • Add each address from your IP block in the format 0.0.0.0/00
      • The /00 (CIDR notation) portion of the address is provided to you by Google Fiber.
    • DNS Server: Unchecked
    • Primary Server: 8.8.8.8
    • Secondary Server: 8.8.4.4
    • (OPTIONAL) Configure IPv6:
      • IPv6 Connection: SLAAC
      • IPv6 Type: Prefix Delegation
      • Prefix Delegation Size: 56 (May be different for your connection)
      • DNS Server: Unchecked
      • Primary Server: 2001:4860:4860::8888
      • Secondary Server: 2001:4860:4860::8844
  4. Apply Changes:
    • Click "Apply Changes" to save your configuration changes
Warning: Your connection may be working at this point although it WILL stop working after about a weeks time if you do not complete the rest of this guide!
Pro Tip: Make sure to document your static IP configuration for future reference. Keep your Google Fiber assignment details in a secure location.
Step 2: Enable SSH on Your UniFi Controller
  1. Navigate to the SSH settings:
    • Open your UniFi Controller user interface
    • Click on "Settings" in the left sidebar
    • Select "Control Plane" from the left menu
    • Click on Console
  2. Enable SSH access:
    • Locate the SSH checkbox
    • Check the box to enable SSH access
  3. Set up SSH authentication:
    • Create a secure password that meets the following requirements:
      • At least 8 characters long
      • Contains uppercase and lowercase letters
      • Includes numbers and special characters
    • Enter your chosen password in the password field
    • Enter your chosen password again in the confirm password field
    • Make note of this password as you will need it for SSH access
  4. Save your changes:
    • Click the Enable button to apply the changes
    • The ssh checkbox will be checked when enabled
Important: SSH access should only be enabled when needed and disabled after use for security purposes. Make sure to use a strong, unique password.
Step 3: Connect to Your UniFi Controller via SSH

Now that SSH is enabled, you can connect to your UniFi controller using an SSH client:

  1. Open your SSH client (PuTTY on Windows or Terminal on macOS/Linux)
  2. Connect using the following details:
    • Hostname/IP: Your UniFi Controllers IP Address
    • Port: 22
    • Username: root
    • Password: The SSH password you set earlier
For PuTTY users:
  1. Enter your UniFi Controllers IP in the "Host Name" field
  2. Ensure port 22 is set
  3. Click "Open"
  4. Accept the security alert if this is your first time connecting
  5. Enter "root" as the username
  6. Enter your SSH password when prompted
For Terminal users:
Warning: When connecting via SSH for the first time, you may receive a security warning about the host key. This is normal for first-time connections. Verify you are connecting to the correct device before accepting.
Step 4: Find Your Network Interface Name

After connecting via SSH, you will need to identify which network interface is being used for your WAN connection.

Run the following command replacing "your.primary.ip.address" with your Google Fiber primary IP address:

ip -o addr show | awk '/your.primary.ip.address/{print $2}'

This command will output your WAN interface name. Example output:

eth0

Make note of the interface name (in this example, eth0) as you will need it for the next steps.

Note: The interface name will typically end in a number one less than the WAN port number you are using.
Step 5: Check if udhcpc is Available

After identifying your network interface, you will need to verify if udhcpc is available on your UniFi controller by running the following two commands:

[ -f '/usr/bin/busybox-legacy/udhcpc' ] && echo 'Available' || echo 'Not Available'
This command will return 'Available' if the udhcpc binary exists at /usr/bin/busybox-legacy/udhcpc, otherwise it returns 'Not Available'.
[ -f '/usr/share/ubios-udapi-server/ubios-udhcpc-script' ] && echo 'Available' || echo 'Not Available'
This command will return 'Available' if the ubios-udhcpc-script exists at /usr/share/ubios-udapi-server/ubios-udhcpc-script, otherwise it returns 'Not Available'.
Warning: If either the udhcpc binary or script is not available, this guide will not work for your UniFi controller! Do NOT continue as this may prevent your controller from booting and remember to disable SSH.
Step 6: Add a CRON Job to your UniFi Controller

Now that we have verified udhcpc is available, we need to create a CRON job that will run on startup to send DHCP packets.

Use the following command to start editing the CRON file for your controller:

crontab -e

Add a new line to the end of the file with the following cron entry replacing the following variables:

  1. your_interface_name: Your Interface Name From Step 4
  2. your.primary.ip.address: Your Primary Google Fiber IP Address
@reboot sleep 60 && /usr/bin/busybox-legacy/udhcpc --foreground --interface your_interface_name --script /usr/share/ubios-udapi-server/ubios-udhcpc-script -r your.primary.ip.address >/var/log/udhcpc.log 2>&1 &

After adding the cron job to your controller be sure to save the file.

Important Notice: Updating or resetting your UniFi controller will clear all crontab settings. You will need to re-add this cron job after any controller firmware updates or resets.
Pro Tip: If you are unfamiliar with editing crontab, the following may be helpful:
  1. Typing i will allow you to type text into the editor.
  2. Pressing ESC and typing :wq will save and close the editor.
Step 7: Restart Your UniFi Controller

After adding the cron job, you will need to restart your UniFi controller for the changes to take effect. Use the following command:

reboot
Warning: Restarting your UniFi controller will temporarily disrupt network connectivity. All clients will need to reconnect once the controller is back online, which typically takes 3-5 minutes.
Step 8: Disable SSH Access

After your UniFi controller has restarted and you've verified everything is working correctly, you should disable SSH access for security:

  1. Navigate back to the SSH settings:
    • Open your UniFi Controller user interface
    • Click on "Settings" in the left sidebar
    • Select "Control Plane" from the left menu
    • Click on Console
  2. Disable SSH access:
    • Uncheck the SSH checkbox
    • Click Disable to save
Security Notice: Always disable SSH access when not actively using it. Leaving SSH enabled unnecessarily increases your attack surface and could pose a security risk.
Date Updated: 09/28/2025
Time Updated: 11:03PM EDT
Updated By: The Floofy Fox
Thank you for your feedback!
Copied to clipboard!