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

Edit /etc/sysconfig/network as follows:

NETWORKING=yes
HOSTNAME=policyhost.yourdomain.com # hostname of your policy server
GATEWAY=192.168.1.254 # address to your gateway

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 # make sure this is the right MAC address for your adapter
IPADDR=192.168.1.10 # desired static IP address
NETMASK=255.255.255.0
ONBOOT=yes

Edit /etc/resolv.conf and setup DNS servers:

search yourdomain.com # your company's domain
nameserver 192.168.1.254 # enter correct IP addresses for your nameservers
nameserver 8.8.8.8
nameserver 202.54.2.5

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 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