This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Setting IP and hostname through commandline

I recently downloaded sophos vmware utm-9.003-esx-v5-x86-smp file for evaluation. Upon successfully deploying ovf on ESX 5.1 and powering on the VM
it gets an IP 192.168.0.1. Also Sophos throws a Welcome message stating

"support  is void if any changes to config is made by root. It says that use Sophos WebAdmin UI to do any config changes"

By this, cant i change/set hostname and IP address using commands
like 
hostname -v ***
ip addr add dev eth0 X.x.x.x/24
ip link set up dev eth0
route add -net x.x.x.x netmask 255.255.255.0 dev eth0
route add default gw x.x.x.x dev eth0

After doing the above config changes, the IP and hostname is effective untill the session ends ( I mean till next reboot happens). Isn't this commandline configuration persistent even though i do reboot.

Is it mandatory that i should use webadmin GUI to set up changes to config

Also
can't i use IPTables command to add rules to sophos for setting Nat rules, port forwarding

Sophos also provides a cc comandline utility to do some config. Where can i get the document of syntax and supported commands, any online help doc available

regards,
Vijay


This thread was automatically locked due to age.
  • the options from command line will be configurable after you enter to Webadmin GUI and finish the setup
  • The setup has not Finished, and remeber in Astaro the GUI is more powerful than cmd
    CMD has just a few things about cache and the kernel but for configuration file WebGui has all
  • Hi Vijay,

    Isn't this commandline configuration persistent even though i do reboot.

    No it isn't. The UTM's configuration control system automatically (re)sets parameters on boot. The only way to make it persistent is through WebAdmin or 'cc' (the commandline client)

    Is it mandatory that i should use webadmin GUI to set up changes to config

    If you have a support contract or commercial license with Sophos for your UTM, yes. The only time you'd normally make changes at the command line are when directed by Sophos support or your Sophos Partner

    can't i use IPTables command to add rules to sophos for setting Nat rules, port forwarding

    Changes will not persist across reboots so there's no point.

    The big thing to understand about the command line in Sophos UTM is that it's intended more for diagnostic & recovery purposes by qualified techs. The command line client 'cc' does not, to my understanding, do the same sanity checks to your config that WebAdmin does. This means you can break things very badly, very easily, very quickly.

    That said, there are a few safe tweaks posted here on the forum which are only accessible through the command line. Like anything not officially sanctioned by Sophos, you do so at your own risk however.[:)]
  • Hi, Vijay, and welcome to the User BB!

    If you want to play with iptables, etc, this isn't the product for you.  If you'd rather be the pilot of a new Boeing 787 Dreamliner instead of a 50-year-old Cessna 150, you're in the right place. [;)]

    With your level of understanding, you will be able to learn WebAdmin quickly.

    A little advice:

    The Zeroeth Rule:

    Start with a hostname that is an FQDN resolvable in public DNS to your public IP.
    If you didn't do that, start over with a factory reset; it will save you hours and frustration.



    Rule #2:

    In general, a packet arriving at an interface is handled only by one of the following, in order:
    DNATs first, then VPNs and Proxies and, finally, manual Routes and Firewall rules.



    Rule #3:

    Never create a Host/Network definition bound to a specific interface.
    Always leave all definitions with 'Interface: >'.



    DNS Best Practice


    Cheers - Bob

  • If you want to play with iptables, etc, this isn't the product for you...
    You nailed it Bob, its like saying I want to use windows but would like to configure everything via command line. 
    Look into vyatta core if you are interested in command line.
  • You nailed it Bob, its like saying I want to use windows but would like to configure everything via command line.

    What? You don't like powershell? [8-)]
  • Powershell [:O] if you want to call it that [8-)] I have nothing against command line utilities but that discussion is moot since any changes via command line make your installation of astaro unsupported. 
    I am not a linux fanboy, I use windows desktop and linux servers and also use exchange since I like the ease of use. But this thread is going in a direction that I rather not take.
    You take care now umkay
  • Hi gyus,
    He just didn't finished the setup and wants to use the cc... thats all [:)]
  • I would say, No it isn't. The UTM's configuration control system automatically resets parameters on boot. The only way to make it persistent is through WebAdmin or 'cc' the commandline client.