shutdown

Franc
Franc Posts: 27  Freshman Member
First Anniversary Friend Collector First Comment
edited April 2021 in Security

Hi,

is there a way to shutting down the USG60 without doing the standard steps via browser (login>maintenance>reboot) ?

In event of electrical supply trouble I'd like to switch off the firewall very quickly to prevent hardware damages (I have already replaced TWO USG 100 for this reason!)

For example, it would be wonderful from my smarthphone have a special link to run directly the shutting down.

Any ideas or suggestion?


Thanks

Best regards

Accepted Solution

«1

All Replies

  • Franc
    Franc Posts: 27  Freshman Member
    First Anniversary Friend Collector First Comment
    edited November 2019

    Thank-you very much @mMontana @lalaland @Zyxel_Emily

    Best regards

  • PeterUK
    PeterUK Posts: 2,655  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer

    Maybe you should look at getting a UPS.

  • Franc
    Franc Posts: 27  Freshman Member
    First Anniversary Friend Collector First Comment

    I have the UPS of course.

    But the right question is why these pro devices don’t support an ups link!

    I am pretty angry because these firewalls are too delicate, just a few sudden stops to damage them.

  • mMontana
    mMontana Posts: 1,298  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer

    Scripting a terminal emulator? Never tried but could be possible.

  • lalaland
    lalaland Posts: 90  Ally Member
    First Anniversary 10 Comments Friend Collector First Answer
    edited October 2019

    How about using python script to perform this task, and add it to windows scheduler run?

    Please don't run this script from wan since it is just simple telnet without encryption.

    (Replace them with your device ip, ID, and password.

    ----------------------------shutdown.py-------------------------------------

    import telnetlib

    #Log in info

    USG_IP = "192.168.2.1"

    ID = "admin"

    Password = "12345"

    tn = telnetlib.Telnet(USG_IP, timeout=1)

    #Set debug level if need

    #tn.set_debuglevel(2)

    #Telnet Log In

    tn.read_until("Username:")

    tn.write(ID + "\n")

    tn.read_until("Password:")

    tn.write(Password + "\n")

    #Put your command here

    tn.write("shutdown\n")

    tn.write("exit\n")

    #print

    print tn.read_all()

    --------------------------------------------------------------------------------

  • Franc
    Franc Posts: 27  Freshman Member
    First Anniversary Friend Collector First Comment
    edited November 2019

    Thank-You @lalaland and @mMontana ! It sounds very good and it may works also in a mobile app. It would be great to swith off the firewall from the smartphone.

    On USG 60 side, how can I enable the telnet script reception?

  • mMontana
    mMontana Posts: 1,298  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer

    Suggest SSH not Telnet outside LAN1.

  • lalaland
    lalaland Posts: 90  Ally Member
    First Anniversary 10 Comments Friend Collector First Answer
    edited November 2019

    @Franc , Enable Telnet at "Configuration > System > Telnet"?

  • Franc
    Franc Posts: 27  Freshman Member
    First Anniversary Friend Collector First Comment

    thank-you very much guys I'll try and I let you know

  • Franc
    Franc Posts: 27  Freshman Member
    First Anniversary Friend Collector First Comment

    Hi @lalaland and @mMontana

    As you suggested I try with SSH, no third party client needed on MacOS.

    I successfully logged in via SSH and I simply wrote "shutdown". The USG immediately has switched off. Very good!!

    I wrote:

    "ssh username@host"

    "password"

    "shutdown"


    One more thing, is this way a RIGHT way to switch off the USG as the standard way via web interface? Or rather, does the USG switch off correctly without damages?


    Thank-you very much!

Security Highlight