Guest User!

You are not Sophos Staff.

Astaro useful shell commands.

Hi to All.
I'm opening this thread so any of you which happens to run into useful Shell commands, can add it in here.
My goal is to create a document with many Astaro useful shell commands.
You are welcome to add, remark or reject any of the commands in here.
[:)]



This thread was automatically locked due to age.
[unlocked by: BAlfson at 2:53 PM (GMT -7) on 4 Jun 2021]
  • Enable local URL FIlter Database on Sophos UTM (Astaro ASG) 

    To set the database as local:

    cc set http sc_local_db [mem/disk/none]

    /var/mdw/scripts/httpproxy restart
    ..


    Rather than trying the local content filter database, I'd recommend enabling the newer SXL lookups. We've had excellent success switching customers to it, when traditional cf lookup performance was suffering. If you're using web protection in UTM endpoint, then it should be enabled already - but you can manually enable it with the following:

    cc set http use_sxl_urid 1 

    I don't recall if it needs a restart of the proxy, it wouldn't hurt. If you've enabled local cf db already, you'll need to set it to none, and definitely need restart the proxy then.

    sxl lookups use a vastly improved caching mechanism that can greatly improve lookup performance, to rival the local cf database performance, and without the extra memory or disk burden. You also don't have to worry about the local db auto-updating randomly, and disruptively at unpredictable times.
  • Goldy, thx very much for this great article and for keeping it alive!!

    Unfortunately I have lost access to my home-use virtual appliance (v9.0) and can not login anymore, neither on console nor via ssh.
    Trying the steps outlined in "Locked out – How to regain all logins" (just as in the knowledge base article) does not  help. However passwd root in single user mode returns "password changed", I still get "Login incorrect" after reboot. Tried it with lots different passwords to eliminate keyboard layout trouble and mistypings and whatever, but nothing helps.

    Does anybody have any idea where to look any further? I am helpless...  [:S][:O][:S]

    Thx in advance!
    felix
  • Dear All,

    In want create new interface in command prompt 

    What's is the command of create new command....


    Kindly help me this...
  • @felix - when you reset the password from single user mode, try setting it to [blank], or just hit enter when asked to enter a new password. In a more recent firmware version, the shell password hash also gets saved in the config backup, and setting it to something other than a blank value seems to cause it to be re-set to the original value on the next boot. Setting it to a blank value should let you login as root with a blank password after the reboot.

    @thastu, there is no single command to create an interface from the shell. It involves finding the existing interface hardware reference in cc, creating a new interface parameters object, and the also creating a new interface object that references both. The process is definitely not trivial, and requires a fairly good understanding of how the cc environment works, and how to create and work with objects stored in cc.
  • To show all interfaces & addresses:
    ip addr

    (ifconfig no longer shows all addresses)

    Barry
  • Thank you Alan/Barry....

    UTM 425s Internal and WAN interface went down we need to take all log files and need find who changed what in the UTM. So i decide to make the new interface(management interface) by command prompt for browse the web admin.

    Kindly help me if any possibility!
  • There is any  possibility to create new interface by command prompt
  • Setting the password to a zero value was the solution...
    THX a lot, AlanT!!  :-)
  • Argghhhhh the SQL rebuild command has changed in 9.200+

    sudo /etc/init.d/postgresql92 rebuild

    This worked for me (following amusing warnings).
  • My universal command for filtering logfiles. It shows only that what we want. Below example for packetfilter.log:

    tail -f packetfilter.log | awk '{ for (i = 1; i