项目作者: michaeldisaro

项目描述 :
A simple script to change your ssh rule's ip on OVH firewall.
高级语言: PHP
项目地址: git://github.com/michaeldisaro/ovh-fw-ip-changer.git
创建时间: 2019-07-31T20:34:31Z
项目社区:https://github.com/michaeldisaro/ovh-fw-ip-changer

开源协议:MIT License

下载


ovh-fw-ip-changer

A simple script to run if you have a dynamic IP address and need to change the old ip in the “ssh access rule” on your OVH firewalls
with the new one.

SETUP

Clone this repository and run a composer install command.

Create an OVH API application and authorize it following: https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/

Once you have APPLICATION KEY, APPLICATION SECRET and CUSTOMER KEY create a config.php using the following template:

  1. <?php
  2. $config = [
  3. "AK" => "1mXkn5umKZUY5bK6",
  4. "AS" => "XV5RM7pDt3nGU49te1kEAp08UiKBQP3K",
  5. "CK" => "A7y4fpDc0HKNDPo7jrJnpvYx7TX9OYzU",
  6. "priority" => 1
  7. ];

AK = APPLICATION KEY, AS = APPLICATION SECRET, CK = CUSTOMER KEY and priority = ssh rule’s priority in your FW chain.

RUN

Just run php ip-changer.php

WARNING

DO NOT LEAVE YOUR CREDENTIALS AROUND! WHO HAS THEM CAN ALLOW SSH TO YOUR MACHINE FOR HIS IP!