PHP Classes

How to Use a NoIP Linux Client Using PHP and the iptables Command Using the Package NoIP iptables Sync: Update network routing to use NoIP with iptables

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-12-20 (7 days ago) RSS 2.0 feedNot enough user ratingsTotal: 19 This week: 19All time: 11,359 This week: 1Up
Version License PHP version Categories
noip-iptables-sync 1.0.0Custom (specified...5Networking, PHP 5, Unix, Systems admi..., G...
Description 

Author

This package can update network routing to use NoIP with iptables.

It provides a PHP script that retrieves NoIP service hostnames from a SQLite database.

The script can obtain the IP address from one of the retrieved hostnames and configures the network routing to use NAT using the iptables command.

Picture of Celso
Name: Celso <contact>
Classes: 3 packages by
Country: Brazil Brazil
Innovation award
Innovation award
Nominee: 2x

Documentation

Utility for renew IPTABLES firewall rules writed in PHP - by Celso Nery

A litle PHP script utility for renew IPTABLES firewall rules.

Maintainer Latest Version Software License Build Quality Score

Requirements

PHP-CLI, SQLITE3 and PHP-SQLITE3

apt install php-cli sqlite3 php-sqlite3

Installation

Copy the updateNoIp.php to /usr/local/bin/ or another directory do you want.

You can use in CRONTAB or Systemd-timer

In CRONTAB with root

contrab -e

and than add this line if you copied the script to /usr/local/bin/

CRONTAB:

/1  * /usr/local/bin/updateNoIp.php

SYSTEMD-TIMER: - copy update-noip.server and update-noip.timer to /lib/systemd/system - create a link into /etc/systemd/system/timers.target.wants/ - run systemctl daemon-reload command

You can see with systemctl list-timers command

The script will create the SQLite database and then you must insert your noip hostname and external ip into this database.

You also edit your iptables rules into script and in your iptables firewall.

In script there are those iptables rules. Change for your needs.

system('iptables -t nat -D PREROUTING -p tcp --dport 5432 -s ' . $row['ip'] . ' -j DNAT --to-dest 192.168.121.250');
system('iptables -t nat -A PREROUTING -p tcp --dport 5432 -s ' . $ip . ' -j DNAT --to-dest 192.168.121.250');

Contributing

Please see CONTRIBUTING for details.

Support

Security: If you discover any security related issues, please email celso.nery@gmail.com instead of using the issue tracker.

Thank you

Credits

License

The MIT License (MIT). Please see License File for more information.


  Files folder image Files (6)  
File Role Description
Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file update-noip.service Data Auxiliary data
Accessible without login Plain text file update-noip.timer Data Auxiliary data
Accessible without login Plain text file updateNoIp.php Example Example script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:19
This week:19
All time:11,359
This week:1Up