cancel
Showing results for 
Search instead for 
Did you mean: 

Change IP Address Using CLI?

Jump to solution

I want to change the ip address of my MWG v7 appliance using the CLI - how do I do this? The ifcfg-eth0 script doesn't have the interface information in it, so I'm not sure where the interface is getting it's IP information from. This interface is the web interface.

Thanks,

Mike

1 Solution

Accepted Solutions

Re: Change IP Address Using CLI?

Jump to solution

Hi Mike,

On my server they are in  /etc/sysconfig/network-scripts/ifcfg-eth0

and changing it there and issuesing a service network reload will work.

Likewise you can use

ip a add 0.0.0.0/0 dev eth0

to add, change and remove them. however I would recomend against doing this as when you reboot MWG will change all the settings back again. I'm sure you can make it persistant if you try, but unless there is an overiding reason why you would want this long term rather than to just suffle things in the backround whilst you do something I'd use the UI.

Tris

6 Replies

Re: Change IP Address Using CLI?

Jump to solution

Hi Mike,

On my server they are in  /etc/sysconfig/network-scripts/ifcfg-eth0

and changing it there and issuesing a service network reload will work.

Likewise you can use

ip a add 0.0.0.0/0 dev eth0

to add, change and remove them. however I would recomend against doing this as when you reboot MWG will change all the settings back again. I'm sure you can make it persistant if you try, but unless there is an overiding reason why you would want this long term rather than to just suffle things in the backround whilst you do something I'd use the UI.

Tris

Re: Change IP Address Using CLI?

Jump to solution

That works. I was able to get an ip on the system configuring ifcfg-eth0. I then used the UI to enter the network config so it would remain after a reboot.

Mike

McAfee Employee jscholte
McAfee Employee
Report Inappropriate Content
Message 4 of 7

Re: Change IP Address Using CLI?

Jump to solution

By modifying the system directly you are not allowing the MWG software to write it into its own files.

This may cause issues when attempting to restore a backup or during the upgrade process.

You will want to set the IP in the interface to be certain the changes are set everywhere.

Best,

Jon

Re: Change IP Address Using CLI?

Jump to solution

Right, that's what I said here "I then used the UI to enter the network config so it would remain after a reboot."

McAfee Employee jscholte
McAfee Employee
Report Inappropriate Content
Message 6 of 7

Re: Change IP Address Using CLI?

Jump to solution

Sorry Mike,

derr on my part. I read that wrong....

Tris' commands should work, I use ifconfig:

# Temporarily configure IP address (will not persist through reboot)

ifconfig eth0 <desired IP> netmask 255.255.0.0

You may also want to set the default gateway sometimes, to do this you can use the following, this will temporarliy set it as well:

ip route add default via <default-gw-ip>

Best,

Jon

Re: Change IP Address Using CLI?

Jump to solution

Thanks @Jon_Scholten!  This is very helpful when accidentally breaking the network settings (I changed the IP in the UI, but forgot to change the default GW, so the only way I could reach the appliance was by the console).

More McAfee Tools to Help You
  • Subscription Service Notification (SNS)
  • How-to: Endpoint Removal Tool
  • Support: Endpoint Security
  • eSupport: Policy Orchestrator
  • Community Help Hub

      New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

    • Find Forum FAQs
    • Learn How to Earn Badges
    • Ask for Help
    Go to Community Help

    Join the Community

      Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

    • Get helpful solutions from McAfee experts.
    • Stay connected to product conversations that matter to you.
    • Participate in product groups led by McAfee employees.
    Join the Community
    Join the Community