Bobcares

Set-up IP Whitelist on Laravel Forge in 6 Steps

by | Jun 24, 2024

IP whitelisting in Laravel Forge enhances security by allowing only trusted IP addresses to access the server and apps. To set up Laravel Forge IP Whitelist, we must run the following steps. At Bobcares, with our Laravel Support Services, we can handle your issues.

Overview
  1. What is IP Whitelisting in Laravel Forge?
  2. Steps for Setting Up IP Whitelist in Laravel Forge
  3. An Example for IP Whitelisting
  4. Benefits of IP Whitelisting
  5. Conclusion

What is IP Whitelisting in Laravel Forge?

IP whitelisting is a security feature in Laravel Forge. This allows us to limit access to the server, services, and apps to a preset list of trusted IP addresses. As a result, only authorized users can interact with the resources.

laravel forge ip whitelist

Steps for Setting Up IP Whitelist in Laravel Forge

1. Initially, go to Laravel Forge and log in with the details.

2. From the Laravel Forge dashboard, select the server we want to set up.

3. In the server’s management interface, go to the “Network” tab.

4. Under the “Firewall” section, we can now add rules to whitelist IP addresses.

5. Click “Add Rule” and specify the IP address or range we want to whitelist.

Rule Name: Give a meaningful name to the rule, such as “Office IP” or “Home IP.”

Source IP: Enter the IP address or range we want to allow.

Port Range: Specify the ports we want to allow traffic on, such as 22 for SSH or 80/443 for HTTP/HTTPS.

Protocol: Choose the protocol (TCP/UDP). Typically, TCP is used for most services.

6. After adding all the desired rules, apply and save them. Laravel Forge will update the server’s firewall settings accordingly.

An Example for IP Whitelisting

To limit SSH access to the server from a certain IP address, set up a firewall rule that only accepts port 22 (the normal SSH port) traffic from that IP address. The steps are the following:

1. Log into Laravel Forge and select the server.

2. Go to the “Network” tab and find the “Firewall” section.

3. Add a new rule:

Rule Name: “SSH Access from Office”

Source IP: Your office’s public IP address.

Port Range: 22-22

Protocol: TCP

4. Save the rule and ensure it is active.

Managing IP Whitelisting

  • We can add new IP addresses or ranges to the “Firewall” section by defining new rules.
  • If IP addresses change or the ports or protocols need to be adjusted, we can amend the existing rules.
  • We can also delete rules to remove whitelisted IP addresses if they are no longer required or there are security issues.

Benefits of IP Whitelisting

  • By restricting access to the server and applications to only a select group of IP addresses, we significantly reduce the attack surface.
  • IP whitelisting ensures that only users from trusted IP addresses can access sensitive areas of the server or app. This reduces the chances of unauthorized use.
  • Many automated attacks start from a wide range of IP addresses. By whitelisting specific IPs, we can effectively block these attempts.
  • IP whitelisting gives us precise control over who can access the server and applications.

[Need to know more? Get in touch with us if you have any further inquiries.]

Conclusion

This article begins with a short explanation on IP whitelisting in Laravel Forge. We’ve also included the steps from our Experts to set up the system. Lastly, the article concludes with the major benefits of setting up IP whitelisting on Laravel Forge.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF