Code Monkey home page Code Monkey logo

redmine_ip_filter's Introduction

Redmine IP Filter

Redmine plugin for access filtering using IP address.

Features

  • Filtering access to redmine site.
  • Setting the filtering rules on Redmine Admin-Page.

Filtering access to redmine site.

add the Filtering module on Redmine, and filtering the access to Redmine site using the Access remote IP address. If the Access remote IP address corresponds to the network address or host address registered in the filtering rules, allow access to the Redmine site. If the filtering rules is not registered, to allow all access.

Setting the filtering rules on Redmine Admin-Page.

setting of filtering rules, operate from the Redmine administrator page.

Setting Page

Host address or Network address can be specified in Filtering rules. Access source IP address, which is operating the Redmine management screen, must have been included in the filtering rules.

Install

Install Redmine plugin

Place the plugin source at Redmine plugins directory.

git clone or copy an unarchived plugin to plugins/redmine_ip_filter on your Redmine installation path.

$ git clone https://www.github.com/redmica/redmine_ip_filter.git /path/to/redmine/plugins/redmine_ip_filter

Preventing IP address spoofing

An attacker may be able to bypass access control done by this plugin if the Redmine server directly accepts HTTP requests from clients without a reverse proxy server or a load balancer (see https://api.rubyonrails.org/classes/ActionDispatch/RemoteIp.html for details).

To prevent such an attack, you have to drop X-Forwarded-For field from an HTTP request header if you don't use a reverse proxy server that adds X-Forwarded-For field.

It can be done by configuring the web server. For example, if you are using Apache, use the RequestHeader directive:

RequestHeader unset X-Forwarded-For

Test

$ cd /path/to/redmine
$ bundle exec rake redmine:plugins:test NAME=redmine_ip_filter RAILS_ENV=test

Uninstall

Remove the plugin directory.

$ cd /path/to/redmine
$ rm -rf plugins/redmine_ip_filter

Command line tools

Add IP addresses to the allowed IP addresses

$ cd /path/to/redmine
$ bin/rails redmine_ip_filter:filters:add ADDR=198.51.100.10
ADD     198.51.100.10
$ bin/rails redmine_ip_filter:filters:add ADDR=198.51.100.11,192.0.2.0/28
ADD     198.51.100.11
ADD     192.0.2.0/28

Delete IP addresses from the allowed IP addresses

$ cd /path/to/redmine
$ bin/rails redmine_ip_filter:filters:delete ADDR=198.51.100.11
DELETE  198.51.100.11

Show the allowed IP addresses

$ bin/rails redmine_ip_filter:filters:show
198.51.100.10
192.0.2.0/28

Test if given IP addresses are allowed

$ bin/rails redmine_ip_filter:filters:test REMOTE_ADDR=192.0.2.15,192.0.2.16
ALLOW   192.0.2.15
REJECT  192.0.2.16

Licence

This plugin is licensed under the GNU General Public License, version 2 (GPLv2)

Author

Takenori Takaki (Far End Technologies)

redmine_ip_filter's People

Contributors

vividtone avatar takenory avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.