This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Modify Host Definition and enable/disable NAT rule via command line

Hi,

is it possible to modify the IP address of an existing host definition via command line? 
Additionally is it possible to enable/disable NAT rules via command line?
Could it be done via cc?

EDIT: Reason: I need to change these values automatically through a script.


Thanks in advance

Dino


This thread was automatically locked due to age.
Parents
  • Hi Bob,

    "skin the cat"... ROFL... never heard of that idiom [:D]

    Hmm, how to explain my scenario...

    We got one Domain from a customer which points to a server located at a datacenter with a fixed ip. Then we have a second server which is "moving" across Europe to different event locations. This server get's a new IP on every event. When the second server at the event boots up, it syncronizes with the datacenter server and becomes the main server, so the domain traffic should be routed to this server.

    Normally we would do this by changing the DNS, but we have no control over the DNS, let the customer do this takes hours to days, and it takes time until all DNS Servers are updated.

    So we changed plans and put a UTM in front. The UTM also got an official IP address and the DNS was changed to this IP. At the UTM we created two FULL-NAT rules. One rule for all incoming traffic to the first server and one rule for all traffic to the second server. We only have to change the host definition to the new IP of the second server and then we disable rule A and enable rule B. This takes only seconds and really works like a charm.

    Yes, we could do this with only one rule and change only the host definition, but as the IP of the datacenter server never changes we want to have a clear fixed rule for that.

    And now we want to do these three things by running a script. Changing IP address of the host definition, disable rule A and enable rule B.

    Can we do this?

    cu,
      Dino
Reply
  • Hi Bob,

    "skin the cat"... ROFL... never heard of that idiom [:D]

    Hmm, how to explain my scenario...

    We got one Domain from a customer which points to a server located at a datacenter with a fixed ip. Then we have a second server which is "moving" across Europe to different event locations. This server get's a new IP on every event. When the second server at the event boots up, it syncronizes with the datacenter server and becomes the main server, so the domain traffic should be routed to this server.

    Normally we would do this by changing the DNS, but we have no control over the DNS, let the customer do this takes hours to days, and it takes time until all DNS Servers are updated.

    So we changed plans and put a UTM in front. The UTM also got an official IP address and the DNS was changed to this IP. At the UTM we created two FULL-NAT rules. One rule for all incoming traffic to the first server and one rule for all traffic to the second server. We only have to change the host definition to the new IP of the second server and then we disable rule A and enable rule B. This takes only seconds and really works like a charm.

    Yes, we could do this with only one rule and change only the host definition, but as the IP of the datacenter server never changes we want to have a clear fixed rule for that.

    And now we want to do these three things by running a script. Changing IP address of the host definition, disable rule A and enable rule B.

    Can we do this?

    cu,
      Dino
Children
No Data