Sophos UTM Shell Commands
Remember:
Direct configuration of Astaro from the shell is unsupported unless directed by Astaro Support staff or official documentation.
For paid licenses, unauthorized shell modifications may void your support agreement.
Run Astaro HTTP Proxy Database Locally
- SSH to ASG and log in as
loginuser. - Switch to root with
su - root. - Run:
cc set http sc_local_db [disk|mem|none] - Restart proxy:
/var/mdw/scripts/httpproxy restart
Note: Web surfing will be slow until the database has downloaded completely.
Check Link Speed
Run ifstat to view interface link speed.
Bandwidth Usage – IFTOP
Use iftop to view live traffic statistics by source, destination, and port.
Example:
root # iftop -i eth1
IFTOP Keyboard Shortcuts:
-
n– Toggle DNS host resolution -
p– Pause display -
t– Cycle line display mode -
q– Quit
Concurrent Connections
Set TCP timeout:
sysctl -w net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=86400
Check established connections:
less /proc/net/ip_conntrack | grep ESTA | wc -l
Check all connections:
less /proc/net/ip_conntrack | wc -l
Check WAIT status connections:
less /proc/net/ip_conntrack | grep WAIT | wc -l
Automatic TOP Snapshots
Create a cron job:
top -b -n 1 >> /tmp/top-report.txt
To view CPU details:
cat /proc/cpuinfo
Restart HTTP Proxy
Stop and start commands:
/var/mdw/scripts/httpproxy stop/var/mdw/scripts/httpproxy start
Restart Middleware
From root:
service mdw restart
Warning: Causes HA failover and interrupts VoIP calls and downloads.
Check Disk Usage
-
df -h– Check disk usage -
du -sh *– Find large directories
Example:
cd /var/storage && du -sh *
Check CPU Type
cat /proc/cpuinfo
Determine Disk Load
Monitor disk I/O every 5 seconds:
vmstat -d 5
For a specific disk (e.g., hda or sda):
vmstat -d | head -2; vmstat -d 5 | grep hda
View Ethernet Details
ethtool eth1mii-diag eth1
Reset Lost WebAdmin Password
- Run
cc - Enter
RAW - Execute
system_password_reset - Press Ctrl + C to exit
Then log in to WebAdmin and reset all passwords.
DNS Flush Cache Missing in V7
Restart the DNS proxy manually:
/var/mdw/scripts/named restart
Change Version Number
- Login as
loginuser - Switch to root:
su - - Edit version file:
vi /etc/version - Save and restart ASG
Change NIC Order
- Login as
loginuser - Switch to root:
su - - Edit file:
/etc/udev/rules.d/70-persistent-net.rules - Restart ASG to apply changes
Recover from Lockout
- Shutdown the firewall and connect screen + keyboard.
- On boot, press ESC in GRUB.
- Select Astaro Security Gateway 7.2.
- Edit boot line with
init=/bin/bash. - Reboot and reset passwords for
loginuserandroot.
Reset to Factory Settings
- Login as
loginuser - Switch to root
- Run the following:
cc RAW system_factory_reset
The system will automatically shut down after the reset completes.