I've 4 VMs on a vps with internet access through a rebond but not visible from the internet. My problem is that i couldn't set the FQDN for each VM. I added this line to /etc/hosts for every VM: "10.10.10.x VMx.local VMx" where x is the number of the VM
Any one have an idea about how to set the FQDN ? and if not is it possible to use IP instead of FQDN ?
i've this config:
Public repond: IP : 151.xx.xx.xx
from the rebond with ssh:
VM | eth0 | | eth1 | VM1 : 192.168.1.10 10.10.10.1 VM2 : 192.168.1.11 10.10.10.2 VM3 : 192.168.1.12 10.10.10.3 VM4 : 192.168.1.13 10.10.10.4
I added this lines to /etc/hosts in every VM 10.10.10.1 VM1.local VM1 10.10.10.2 VM2.local VM2 10.10.10.3 VM3.local VM3 10.10.10.4 VM4.local VM4 Now i'm able to use "ping VMx" from every VM and ssh user@VMx works too.
hostname -f returns VMx.local
is this fine ?
You need to set hostbame in /etc/sysconfig/network i dont remember exact path but check with your OS documentation. Then run
hostname hostname -f