Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata
nano ~/valid_ip.sh && chmod 777 ~/valid_ip.sh
#!/bin/bash

ip=10.1.10.4

if [[ $ip =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
  echo "success"
else
  ifdown eth0 && ifup eth0 && ifconfig
fi 
nano /etc/dhcp/dhclient.conf 
alias {   interface "eth0";   
fixed-address 10.1.1.1;   
option subnet-mask 255.0.0.0; } 
  • No labels