Giter Club home page Giter Club logo

natmgr's People

Contributors

mmabey avatar

Watchers

 avatar  avatar

Forkers

visualcorps

natmgr's Issues

Add "renew" command for updating the expiration date of a rule

If a rule expires before the requester is actually done using the port, it would be helpful to allow an easy way to update just the expiration date for the rule. Intended use is something like this:

# nat renew 4444
 Port #       IP Address    : Port  Expires On  Requested By
 ------  -------------------------  ----------  ------------
   4444    10.  90. 138.  50:   80  2017-01-01  John Doe

Enter new expiration date (YYYY-MM-DD or 0 for never):

At this point, the user can give the new expiration date for the rule and proceed as normal.

Add support for emailing responsible party about rule expiration

When the daily cron job runs, it will remove any expired port forwarding rules. When this happens, it would be good to notify the person that originally requested the rule that it is no longer active and that they should submit a new request if they still need it.

Allow spaces, port, when user inputs IP address

In the case where a user is rebuilding the set of rules, it would be helpful to allow them to copy/paste the output of this same tool when entering a new rule. This means two things:

  1. Removing any whitespace from the input for the destination IP address
  2. Parsing for a destination port number, then skipping the input prompt for that field

Unable to add a rule for a port that conflicts with an expired rule

If an expired rule uses port X and you try to add a new rule that also uses port X, it will give an error that the port is already is use and not allow the new rule. The program then outputs a list of "used" ports, but shows only current rules, which is confusing for the user since they don't see port X as being used.

Where the program checks for an existing rule for port X, expired rules should be excluded.

Entering an invalid port number as parameter causes infinite loop

If the user specifies the source port number as a parameter, e.g.

nat add 1234567

then the program will enter an infinite loop, not giving the user a chance to enter a new port. This infinite loop will also occur when they input a port that has already been taken.

Maintain old rules until explicitly flushed from the list

An expired rule in the rule list never propagates to the /etc/init.d/nat.sh script. As such, it's not really necessary to always remove expired rules from the rules.json file whenever we write a new version of it. Instead, the program should wait until explicitly told to remove them.

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.