hyperv vm not reachable from another computer in network - hyper-v

I am trying to setup a cluster. I have 2 laptops in my LAN.
Laptop 1 windows VM with hyperv enable
Laptop 2 running ubuntu on bare metal.
In laptop 1, I created a VM (ubuntu) using hyperv with default switch. Now I am trying to connect from laptop2 to vm running in laptop 1, but ping doesn't reach the vm.
On the other hand, hyperv vm is able to connect with laptop 2.
I have disabled firewall in hyperv vm and laptop 2.
Could somebody please help me setup network such that connection in both direction is possible? Below are ip addresses details in cases needed.
Laptop 1 host IP details
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::d0aa:e43:2164:18c8%21
IPv4 Address. . . . . . . . . . . : 192.168.1.73
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.254
Laptop 1 hyperv switch IP details:
Ethernet adapter vEthernet (Default Switch):
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::718d:fd08:76a:c25a%54
IPv4 Address. . . . . . . . . . . : 192.168.35.129
Subnet Mask . . . . . . . . . . . : 255.255.255.240
Default Gateway . . . . . . . . . :
Laptop 1 Hyper v based ubuntu VM IP details:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.35.139 netmask 255.255.255.240 broadcast 192.168.35.143
Laptop 2 IP detail
wlp13s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.83 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::42eb:609b:b991:7db4 prefixlen 64 scopeid 0x20<link>

Related

Hosting database in Xampp (in separate fixed port)

I have successfully hosted database with xampp
https://stackoverflow.com/a/48990347/15493370
This is the link which I followed. Now It works fine but there is one problem. I want the database to be hosted in 192.168.100.2:8080 forever. How can I do that?
Suppose my current Ip is 192.168.100.59.
On using ipconfig
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . :
IPv4 Address. . . . . . . . . . . : 192.168.100.59
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : fe80::1%12
192.168.100.1
I have not included ipv6 as it is not used anywhere.
I tried using IP 192.168.100.2 in the httpd.conf file. It still listens to 192.168.100.59 not what I want.
So my question is How can I make it host to fixed private Ip in LAN at any time
Or
Will it change overtime
If so how can I solve this problem. (I am not connecting different networks just single network )
You have to statically set your ip address so when your pc/server restarts/reboots it doesn't change its ip.
Alternatively you can create a static lease on dhcp server based on your server's mac address and always assign the same ip to that mac.

MACOS 10.13.6 - PG Admin 4 | Server not listening

I tried to install PgAdmin4 for the second time on my MacBook but it don't want to connect to the localhost database "PostgresSQL 10".
On PG4 I've got this error :
Could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
I used terminal command : netstat -ap tcp | grep -i "listen" and got this result :
tcp4 0 0 localhost.52065 . LISTEN
tcp6 0 0 *.49335 . LISTEN
tcp4 0 0 *.49335 . LISTEN
tcp4 0 0 localhost.ipp . LISTEN
tcp6 0 0 localhost.ipp . LISTEN
tcp46 0 0 *.5557 . LISTEN
tcp46 0 0 *.freeciv . LISTEN
tcp46 0 0 *.10134 . LISTEN
tcp46 0 0 *.nfsd-status . LISTEN
tcp4 0 0 *.nfsd-status . LISTEN
So I tried to install PG3 and see the difference but it's just show me the same error in a "document" version with the title "Serveur not listening" with all the details. I've found somethere that I have to change the file "pg_hba.conf " but I can't found it on the files of the application.
On this topic : pgAdmin III Server doesn't listen they talk about firewall issue but I don't use one.
Oh ok, it sounds a bit confusing because if you have one instance of Postgresql running the default install port is 5432. You should add a postgresql tag to your issue I don't think it's PGadmin.
Have you been able to connect to Postgresql by any means? Just wondering, it will make it easier to sort if you do have access. I'm on Win 10 but possibly if your Postgresql is installed but not running currently you should try starting it;
sudo /etc/init.d/postgresql start
You will probably need to edit pg_hba.conf once you are sure it has started. You might find it at /etc/postgresql/10/main/pg_hba.conf but before that you will find postgresql.conf at the same location and that file will contain the listen port #.
Try this out and report back please, good luck

Can't Ping Instances or SSH into Instances from Host

I have installed Devstack successfully in Ubuntu 16.04 in a VirtualBox VM.
enp0s3 :10.6.208.111
lo: 127.0.0.1
virbr0: 192.168.122.1
I have both default public and private network in my topology network with a router.
I am not able to ping between my host and the instance created (IP:192.168.101.3 and floating IPs: 172.24.4.15). Host IP: 10.6.208.111
Current settings:
Public Network (public 172.24.4.0/27)
Private Network (private 192.168.101.0/24)
I also created a floating IP with the IP address 172.24.4.15
I created a router with 2 interfaces: one connects to the public and one connects to the private. I created the VM's in the private network.
How can I SSH to the instance created and ping it from my host IP?
Thank you.
I did for ocata version devstack installation with the single NIC, May be this will help.
Install the openstack with devstack ocata version
Delete the existing/default networks
2.1 Deletet all the router interfaces and then the router
2.2 Deletet all the networks
Create the networks public and private
Add the router and its interfaces to public and private network
Add the TCP and ICMP to the security Group.(Networktopology> security group> manage rules> add)
Configure the Bridge in command prompt
Note:
Make sure the details like bridge, interface, network ip to be changes as per your need.
Public netwrok : 10.0.15.0
private network: 192.168.11.0
external bridge: br-ex
interface : enp0s8
Ubuntu ip : 10.0.15.20
3 Create the network private
project:admin
project >
network topology >
create a network >
network name : private-net
enable admin state: yes
shared :no
create subnet:yes
next >
subnet name : private-net-subnet
Network Address Source : enter network address manually
Network Address : 192.168.11.0/24
IP Version : IPV4
Gateway IP : 192.168.11.1
Disable Gateway : No
next >
Enable DHCP : yes
Allocation Pools : 192.168.11.120,192.168.11.140
DNS Name Servers : 8.8.8.8
Host Routes :
3 Create the network public
admin >
networks >
Create Network >
Name : public-net
Project : demo
Provider Network Type : Flat
Physical Network : public
Enable Admin State : yes
Shared : yes
External Network : yes
public-net >
Create subnet >
Subnet Name : public-net-subnet
Network Address Source : enter network address manually
Network Address : 10.0.15.0/24
IP Version : IPV4
Gateway IP : 10.0.15.1
Disable Gateway : No
next >
Enable DHCP : yes
Allocation Pools : 10.0.15.120,10.0.15.140
DNS Name Servers : 10.0.9.10
Host Routes :
4 Adding the router and its interfaces to public and private network
admin >
networks >
Routers >
Create Router >
Router Name : router 1
Enable Admin State : yes
External Network : public-net
create Router >
project >
networks >
Routers >
router 1 >
interfaces >
add interface >
subnet : private-net
ip address :
submit >
6 Configure the Bridge in command prompt (ubuntu openstack host)
sudo ifconfig br-ex promisc up
sudo ovs-vsctl add-port br-ex enp0s8 & sudo ifconfig br-ex 10.0.15.20 netmask 255.255.255.0
systemctl restart networking.service

tcp flood attack not works with hping3

i want to do a dos attack to a website in my virtual machine. i use hping3 for that .
sudo hping3 -i u1 -S -c 9999999999 192.168.58.3
in this ip address i have an apache server and a DVWA. when i input this ip address to the browser i see two folder : DVWA and html . when i choose DVWA i see the website.
my problem is than althogh i use hping3 for attack and i want the website get down but the website not down and when i ping this ip address ttls are like when attack not occured. i search a lot and do all works i think . i don't know what is the problem. please help me. thanks
Try this:
$ sudo hping3 -i u1 -S -p 80 192.168.58.3
S - indicates SYN flag
p 80 - Target port 80
i u1 - Wait for 1 micro second between each packet
This would send TCP SYN packets to 192.168.58.3.

Webserver over Internet not just localhost

I have made a "webserver" in vb.net the problem is that it seems like it's just listening to 127.0.0.1 (localhost) and not request that is sent over the internet. I have changed the listening adress to my public internet ip but it's still just listening to local requests.
Do someone have a source code with a working example of how this could be accomplished?
Dim address As IPAddress = IPAddress.Parse(79.138.xxx.xxx)
Dim EndPoint As IPEndPoint = New IPEndPoint(address,8082)
Dim ss As Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
ss.Bind(EndPoint)
ss.Listen(20)
Are you behind any kind of network? This includes a router from your ISP, or generally any hardware other than the simplest of modems.
Easy way to tell would be to do an IPCONFIG and see what your local IP address is set to. To do so, open a command prompt, and enter: ipconfig /all
My output, as an example, is this:
Wireless LAN adapter Wireless Network Connection:
Connection-specific DNS Suffix . : home
Description . . . . . . . . . . . : Intel(R) WiFi Link 5100 AGN
Physical Address. . . . . . . . . : 00-22-FB-8A-59-8E
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.1.2 (Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Monday, December 27, 2010 7:50:12 PM
Lease Expires . . . . . . . . . . : Tuesday, December 28, 2010 9:13:01 PM
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 192.168.1.1
68.238.0.12
NetBIOS over Tcpip. . . . . . . . : Enabled
This tell me that the IP address of my computer is 192.168.1.2, which is far different than that of my public internet connection, due to being behind a router.
If this is the case, you'll need to open a path from the public world to your specific IP address behind your hardware. This is usually referred to as Port Forwarding or similar, and would be configured in your router/firewall.
Also, as a doublecheck, do you have software firewalls disabled?