L
L
lohmag2014-10-30 16:07:38
Windows
lohmag, 2014-10-30 16:07:38

How to change the Windows gateway from zabbix (poppy address error crashes)?

I configured the Action to be triggered by a trigger from Zabbix, namely the launch of a batch file to change the gateway.

netsh int ip set address name="outside" static 10.0.0.4 255.255.255.0 10.0.0.1 1
timeout /t 3 /nobreak
netsh interface set interface "outside" disable
timeout /t 3 /nobreak
netsh interface set interface "outside" enable
echo down > c:\log.txt

566154c9520b4c43b1c4dc3c63afe7b7.png
When executing the batch file locally - everything is ok, if from zabbix, the gateway does not change, but an error occurs in the logs
Log Name:      System
Source:        Tcpip
Date:          29.10.2014 23:45:07
Event ID:      4199
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      srv-isa.stargate.lan
Description:
The system detected an address conflict for IP address 10.0.0.4 with the system having network hardware address 1C-DF-0F-60-AA-58. Network operations on this system may be disrupted as a result.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Tcpip" />
    <EventID Qualifiers="49152">4199</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2014-10-29T20:45:07.458683100Z" />
    <EventRecordID>7201</EventRecordID>
    <Channel>System</Channel>
    <Computer>srv-isa.stargate.lan</Computer>
    <Security />
  </System>
  <EventData>
    <Data>
    </Data>
    <Data>10.0.0.4</Data>
    <Data>1C-DF-0F-60-AA-58</Data>
    <Binary>0000000003002C0000000000671000C0020000000000000000000000000000000000000000000000</Binary>
  </EventData>
</Event>

The script itself is executed because echo goes to a file. Addresses 10.0.0.4 not made from logs no 100%
The strangest thing is that the reverse script executed from zabbix, similar to the previous one, which returns the gateway to its original position, works normally without errors.
What could be the problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question