Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7714113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:02:48+00:00 2026-06-01T02:02:48+00:00

I have a Rails 3.2.2 application which is a simple company intranet, however although

  • 0

I have a Rails 3.2.2 application which is a simple company intranet, however although there isn’t any private information on there it’s probably best if it was fairly secure from the outside world.

We do however have people working from home on fairly regular occasions that don’t have a VPN setup.

Currently I have a firewall rule that blocks everyone except a list of our teams/branches static IP addresses. The problem with this is when a team member visits the site from home the site never loads because the firewall rejects them. What I would like to do is serve a simple page within the application explaining why they don’t have “full” access.

The firewall is serving multiple applications, so I can’t put the access denied page on there

I have read a few questions on SO such as Get real IP address in local Rails development environment which show how to get their IP address, but I’m unsure how to alter a default route based on that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:02:49+00:00Added an answer on June 1, 2026 at 2:02 am

    Dae raises a good point in the comments, but just so you know:

    http://guides.rubyonrails.org/routing.html#advanced-constraints

    class BlacklistConstraint
       def initialize
         @ips = Blacklist.retrieve_ips
       end
    
       def matches?(request)
        @ips.include?(request.remote_ip)
       end
    end
    
    YourApp::Application.routes.draw do
      match "*path" => "blacklist#index", :constraints => BlacklistConstraint.new
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my Rails application I have a simple controller which also has an action
I have a simple Rails application with which I am trying to use the
I have a simple rails application in which I'm trying to add a very
I have a rails application which is still showing the cachebusting numeric string at
I'm looking at building a Rails application which will have some pretty large tables
I have a RAILS 3.x application developed locally using MySQL which has data which
In my rails application, I have a controller called demo which is stored at
I have a Rails project which has a Postgres database for the actual application
I have created a blog application using Ruby on Rails which includes the ability
I have an Ruby on Rails 3 Heroku application, which needs to perform text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.