1

Normally after booting the system with Linux ISO image we can able to access the system from an external network using their IP address. And by default it will have loopback address(127.0.0.1) and some IP address (x.x.x.x)

Here, what I want to do is i want to configure my own IP (100.5.3.1) by without booting the system. i.e the ISO itself should consist the IP (100.5.3.1).

The steps i followed given below. But i am unable to access the system externally by giving that IP address(100.5.3.1).

  1. I mounted the Cent OS image.

    mount -o loop linux.iso /mnt

  2. I unsquashed the squashfs.img to change the IP address.

    unsquashfs squashfs.img

  3. I edited the following files

    squashfs-root/etc/apache2/listen.conf # changed Listen 127.0.0.1:80 to Listen 0.0.0.0:80

    squashfs-root/etc/apache2/vhosts.d/bender.conf # changed Listen 127.0.0.1:80 to Listen 0.0.0.0:5008

    squashfs-root/etc/apache2/vhosts.d/hpsmh.conf # changed Listen 127.0.0.1:2381 to Listen 0.0.0.0:2381

    /root/compaq/netconfig.sh --ip 100.5.3.1 --netmask 255.255.224.0 --gateway 100.58.30.1 --device eth5

  4. Again I compressed the squash and compressed the ISO image.

The system is booting well but I am unable to access the system with that IP (100.5.3.1).

Answer would be appreciated.

  • This does not seem to be a standard CentOS installation image, but something else, probably a customized Live OS image of some sort. It is not clear how the /root/compaq/netconfig.sh is at all related, given that it appears to be located neither under /mnt nor within squashfs-root. Have you thoroughly checked all the relevant documentation available from wherever you got the image from? – telcoM May 17 '18 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.