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]
  • I didn't have a backup yet... I was still configuring the system.  The weird thing is that when I rebooted the box Webmin was re-enabled.
  • Hello!

    Could you please tell me where I can find which updates are already cached on ACC? I've looked up in all cache and up2date dirs and found nothing. 
    Now the newest package is 8.307 and I don't know was it prefetched or not.

    Thanks in advance!
  • WebAdmin will show you a message on the Dashboard.  Also, you can see in 'Management >> Up2Date'.

    Up2Dates are downloaded into /var/up2date/sys

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Persistent change of ip  conntrack timeout

    You can change them via command line.

    To see the current values:
    # cc get packetfilter timeouts
    packetfilter->timeouts = {
    "ip_conntrack_generic_timeout" => 600,
    "ip_conntrack_icmp_timeout" => 30,
    "ip_conntrack_tcp_timeout_close" => 10,
    "ip_conntrack_tcp_timeout_close_wait" => 60,
    "ip_conntrack_tcp_timeout_established" => 86400,
    "ip_conntrack_tcp_timeout_fin_wait" => 120,
    "ip_conntrack_tcp_timeout_last_ack" => 30,
    "ip_conntrack_tcp_timeout_max_retrans" => 300,
    "ip_conntrack_tcp_timeout_syn_recv" => 60,
    "ip_conntrack_tcp_timeout_syn_sent" => 120,
    "ip_conntrack_tcp_timeout_time_wait" => 120,
    "ip_conntrack_udp_timeout" => 30,
    "ip_conntrack_udp_timeout_stream" => 180
    }

    To increase a value, use:
    # cc set packetfilter timeouts ip_conntrack_udp_timeout 45

    Btw: There is udp_timeout and udp_timeout_stream.
    So if packets are send in both directions, then udp_timeout_stream is applied.

    Thanks to Ulrich...
  • trollvottel posted how to backup the Wireless Vouchers at:
    https://community.sophos.com/products/unified-threat-management/astaroorg/f/60/t/56389

    Well, under the hood you can dump the DB and import after a reinstall using the 'pg_dump' & 'pg_restore' commands. But this is only safe if you don't change system version in the meantime so that DB schema is ensured to stay the same.

    Howto: (untested)
    - Export: pg_dump -U postgres hotspot > hotspot.sql
    - Import: pg_restore -U postgres -c 
  • Testing or Checking User Authentication
    tail -f aua.log endpoint.log

    Turning on detailed debug mode for Authentication
    killall -USR2 aua.bin
    execute again to turn off

    AD SSO Tools
    wbinfo-u           Users in AD
    wbinfo-g           Groups in AD
    wbinfo-r   Groups "User" belongs to
    wbinfo-D            Domain Info
  • To View automatic firewall rules from command line
    iptables -L AUTO_FORWARD

    Packet Filter
    iptables -L -nv
  • To configure UTM with a single physical NIC by converting untagged default eth0 to a VLAN tagged interface:

    # cc ↩
    set_object({class=>'interface', type=>'vlan', ref=>'REF_DefaultInternal', data=>{name=>'Internal', itfhw=>'REF_ItfHwDefaultInternal', primary_address=>'REF_ItfParamsDefaultInternal', bandwidth=>100000000, status=>1, vlantag=>1}}) ↩
    quit ↩

    That converts the untagged default internal interface eth0 to be a VLAN tagged interface eth0:1 (VLAN ID 1).

    Please note that this *only* applies to the predefined 'internal' interface and affects the assigned physical NIC! So if you changed it to anything else than eth0, it will apply to that interface instead

    Remember to configure the switchport accordingly to be able to reach WebAdmin again.