Why can my vpshost server see my vpses but my other machines can't? - webserver

I've just installed ubuntu server 12.04 to a new machine, on that server I have two VPS, each of them are running ubuntu server 12.04 as well.
I cannot seem to find my vps from any other machine on the network other than the vpshost machine where they are running.
Pinging vps1 from vpshost:
64 bytes from 192.168.122.94: icmp_req=2 ttl=64 time=0.027 ms
Pinging vps1 from my laptop via winxp:
Pinging 192.168.122.94 with 32 bytes of data:
Request timed out.
I get a similar error when I try to browse to the server via firefox (they're both running apache).
The connection has timed out
The server at 192.168.122.139 is taking too long to respond.
As part of a tutorial I did create a bridge, could it be possible the bridge is not working, and thus not allowed anything external to see them?
What the bridge looks like:
auto br0
iface br0 inet static
address 192.168.1.43
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off

Related

How to emulate QEMU to connect server sockets

I have set up a QEMU virtual machine (VM) trying to emulate an ARM Cortex-A9 cpu on my lubuntu VM (on VirtualBox). Using the kernel, initrd and image of this article, I start QEMU like this:
qemu-system-arm -M vexpress-a9 -cpu cortex-a9
-m 512
-kernel vmlinuz-3.2.0-4-vexpress
-initrd initrd.img-3.2.0-4-vexpress
-drive if=sd,file=debian_wheezy_armhf_standard.qcow2
-append "root=/dev/mmcblk0p2"
-nic user,hostfwd=tcp::5555-:22
After it boots up, I have configurated an static IP on the guest. Modifying the path /etc/network/interfaces.
auto eth0
iface eth0 inet static
address 192.168.0.102
netmask 255.255.255.0
gateway 192.168.0.11
The VM lubuntu, is on the same IP range (192.168.0.1) and my goal is to be able to stablish a connection from QEMU VM to three server sockets which are on port 12000, 13000 and 14000 on the lubuntu VM.
Which parameters do i have to modify/add? I've been reading the network documentation but any test i do, is not working.
UPDATE 1
Following #Peter Maydell advice i changed the network configuration to run a dhcp client instead of an static IP.
# /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
So when running # ip a i get the IP 10.0.2.15/24. Anyways, now I'm being able to reach every net from QEMU but, to be honest, i would prefer to set up a static IP.
You can't just pick an IP address at random for your guest. It has to match the fake network that user-mode networking creates, which is (as the wiki page you link to mentions) on 10.0.2.x by default. It will not (and should not be) on the same IP range as the host or this other VM. The simplest thing is to have the guest run a DHCP client, which will then be able to automatically pick up the right network config from the fake DHCP server that the user-mode networking sets up.
Cross-VM communication as you want should be doable. First check that you can connect from the host to those ports on the lubuntu VM. If you can't do that then you need to fix that VM's config first. Once that is working, then it should also work to connect from the in-QEMU guest to the lubuntu VM on the same IP address/port. This is because outbound connections from the QEMU user-mode-networked guest to either the host or to the outside world require no special configuration. It's only inbound connections to the QEMU guest that need hostfwd setup.

Not able add extra IP to vps server in OVH

I am trying to add extra IP to my OVH vps server by following there guide but getting this error.
I am using cent os 6 - 64bit using this guide to add IP to my vps server
https://docs.ovh.com/gb/en/dedicated/network-ipaliasing/
"# ifup eth0:0
ipcalc: bad netmask: 255.255.255.255
ipcalc: bad netmask: 255.255.255.255
is already in use for device eth0...79
/".or: an inet prefix is expected rather than "54.xx.xx.xxx
.for eth0:0g address 54.xx.xx.xxx
bind: Cannot assign requested address"
Where am I wrong? Please help
Is it a dedicated server or VPS? Ask the OVH support if they allow additional IP on a VPS
Try using Prefix instead of NETMASK

Can't start etcd service OpenStack Install Ubuntu 16.04.4

I'm following the OpenStack install guide here (for Queens release) and I'm up to this page:
https://docs.openstack.org/install-guide/environment-etcd-ubuntu.html
Both VMs = VirtualBox on Ubuntu 16.04.4.
Each VM has two NICs. First is host-only set to 10.0.0.11 and 10.0.0.21 (controller and compute node respectively). Second NIC is NAT (for net access).
I can ping between controller (10.0.0.11) and compute (10.0.0.21).
I've installed and configured etcd but when I try to run it: systemctl start etcd it fails to run.
Looking at journalctl -xe I see:
listen tcp 10.0.0.11:2379: bind: cannot assign requested address
Strangely if I do an ifconfig, I only see an ipv6 address assigned to enp0s3
enp0s3 Link encap: Ethernet HWaddr ****
inet6 addr: fe80::***** Scope:Link
UP BORADCAST RUNNING MULTICAST MTU:1500 Metric:1
...

Add Additional Ips to my new Dedicated Server

I'am not really into Commands and Dedciated server but i had to buy one recently with 5 usuable Ips and got the informations Bellow :
Usable IP Range: 142.54.190.234 - 142.54.190.238
Gateway: 142.54.190.233
Subnet Mask:255.255.255.248
How can add those Ips to the Main one via SSH ?? since i can connect to only the first one which is 142.54.190.234 knowing that im planing to Install Powermta on that server Btw the machine is runing centos 6
Assuming your default interface is eth0 then you'll be able to add the other ip address as aliases to the default interface (eth0) or whatever interface name you have there.
ifconfig eth0:0 142.54.190.235 netmask 255.255.255.248
ifconfig eth0:1 142.54.190.236 netmask 255.255.255.248
ifconfig eth0:2 142.54.190.237 netmask 255.255.255.248
ifconfig eth0:3 142.54.190.238 netmask 255.255.255.248
If you can add these in /etc/rc.local at the end just to be sure that in case of a restart/reboot of the server, these ips are added after boot.
There are other methods as well but this would be the easiest one and it does exactly what you need.

Open TCP ports on Raspbian

I am trying to use my raspberry pi as a server, I have a java app using tcp port 1777 and mysql on 3306, however neither one or the other is accessible from lan (both works fine from the pi itself). When I scan the ports open on the pi from my laptop I only see the ssh and vnc ports, but when running the netstat on the pi both ports appear to be in listening state. I am running the latest version of raspbian (image had a ssh and vnc disabled by default, I enabled it in pi configuration (raspi-config)). Any ideas?
In my opinion, check which interface these services are listening on because the services listening on localhost are not 'binded' to the external network so try to make them listening on 192.**** ip address.
Example : Edit MySQL configuration
By default, MySQL is not configured to accept remote connections. You can enable remote connections by modifying the configuration file:
sudo nano /etc/mysql/my.cnf
and set bind-address = 192.** or bind-address = 0.0.0.0 then restart mysql servic:
sudo service mysql restart