How can we help?

How can I change the IP address of my server via command line?

Follow

Changing your IP address

Netsweeper is built on a Linux OS, and as such using the appropriate commands for this OS will allow for configuration of your Ethernet Devices.

For static IP configuration you need to edit the following files using a text editor such as vi.

Required Configuration

  1. Edit /etc/sysconfig/network as follows:
    NETWORKING=yes
    HOSTNAME=yourhostname.yourdomain.com
    GATEWAY=192.168.1.1
  2. Edit /etc/sysconfig/network-scripts/ifcfg-eth0:
    DEVICE=eth0 # device you are using to intercept Netsweeper traffic
    BOOTPROTO=static
    DHCPCLASS=
    HWADDR=00:30:48:56:A6:2E
    IPADDR=192.168.1.10
    NETMASK=255.255.255.0
    ONBOOT=yes
  3. Edit /etc/resolv.conf and setup DNS servers:
    search yourdomain.com 
    nameserver 192.168.1.254
    nameserver 8.8.8.8
    nameserver 202.54.2.5
  4. Finally, you need to restart the networking service, enter:
    service network restart

Verifying Network Settings

The following commands can be used to verify your new static ip configuration for eth0:

ifconfig eth0
route -n
ping 192.168.1.254
ping google.com

Changing the Deny Page Host

Lastly, If you configure your deny_page_host by IP and it is pointing to localhost, then you will need to change that in the policy server configuration.

/usr/local/netsweeper/etc/nsd.conf:

deny_page_host 192.168.1.10
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request