I have set the default localhost server to run on my MAC with apache with the default settings. I can access the local server using localhost and the IP from the server it self but cannot access from another PC using the IP connected on the same WIFI network with a simple router.
I have disabled the firewall on mac but nothing.
This is my /etc/hosts file:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
The mac IP on wifi is 192.168.10.102, the other PC IP is 192.168.10.105
Apache is set to listen on port 80, http.conf
Listen 80
sudo tcpdump -i en0 result:
15:35:28.384152 IP 192.168.10.105.63630 > 192.168.10.102.http: Flags [S], seq 2700046236, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
15:35:28.674606 IP 192.168.10.105.63631 > 192.168.10.102.http: Flags [S], seq 3459374519, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
15:35:29.335909 IP 192.168.10.102.51270 > 192.168.10.1.domain: 50623+ PTR? 103.10.168.192.in-addr.arpa. (45)
15:35:29.343300 IP 192.168.10.1.domain > 192.168.10.102.51270: 50623 NXDomain* 0/1/0 (95)
15:35:29.593550 IP 192.168.10.105.netbios-dgm > 192.168.10.255.netbios-dgm: NBT UDP PACKET(138)
15:35:30.345378 IP 192.168.10.102.58188 > 192.168.10.1.domain: 60091+ PTR? 255.10.168.192.in-addr.arpa. (45)
15:35:30.352597 IP 192.168.10.1.domain > 192.168.10.102.58188: 60091 NXDomain* 0/1/0 (95)
15:35:31.337113 ARP, Request who-has 192.168.10.102 tell 192.168.10.1, length 28
NOTE
While restarting the MAC computer for a couple of seconds I am able to access the localhost server with IP from the other computer...
Also the MAC has installed Symanctec End Point Protection which I cannot find a way to disable it even I have sudo permissions.
Any ideas?
After loosing almost 1 day and a half I found that Endpoint Security of Symantec blocked incomming connections. I came across this script that saved my days (disables service):
https://gist.github.com/phoob/671e65332c86682d5674
Also this is valid:
https://gist.github.com/bubenkoff/4043130
Hope helps some one other.
Related
elasticsearch==7.10.0
I wish to ping local host '5601' to ensure kibana is running or not but apparently unable to ping.
Note: I am aware that elastic search has in-built function to ping but I still wish to ping using cmd line for a specific reason in my project.
C:\User>ping 5601
Pinging f00:b00:f00:b00 with 32 bytes of data:
PING: transmit failed. General failure.
PING: transmit failed. General failure.
PING: transmit failed. General failure.
PING: transmit failed. General failure.
Ping statistics for f00:b00:f00:b00:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)
C:\User>ping http://localhost:5601
Ping request could not find host http://localhost:5601. Please check the name and try again.
Could someone help me?
You can use netstat to check if the port exposed by the Kibana UI, 5061 is in LISTEN mode
$ netstat -tlpn | grep 5601
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 0 :::5601 :::* LISTEN -
Or if you want to establish a connection to destination port 5601 you can use nc
$ nc -vz localhost 5601
Connection to localhost 5601 port [tcp/*] succeeded!
I've got a Linux VMware virtual machine (guest) configured with a NAT adapter on a 192.168.56.0 subnet. Its IP address is 192.168.56.128 and my Mac (host) got 192.168.56.1. Guest's default gateway is automatically set to 192.168.56.2 and is able to ping google. Host's Wi-Fi IP is 192.168.0.2,
I've configured my Wi-Fi router with following routing table to forward packets of 192.168.56.0 to 192.168.0.2 (my Mac)
pi#raspberrypi ~ $ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 172.16.4.1 0.0.0.0 UG 0 0 0 eth0
172.16.4.0 * 255.255.252.0 U 0 0 0 eth0
192.168.0.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.56.0 192.168.0.2 255.255.255.255 UGH 0 0 0 wlan0
192.168.57.0 192.168.0.2 255.255.255.255 UGH 0 0 0 wlan0
But I'm unable to ping guest from any other device on the Wi-Fi network (192.168.0.0). So it's obvious that my Mac running OS X El Capitan is not forwarding the packets from 192.168.0.0 to 192.168.56.0
Not sure about your specific case. In my case I just had two ethernets on the same MacMini and one host being one of these ethernets. The only thing I had to do is sudo sysctl -w net.inet.ip.forwarding=1
https://roelant.net/2015/share-your-vpn-mac-el-capitan.html however noted another variable as well (sudo sysctl -w net.inet.ip.fw.enable=1) and went into a NAT scenario (which I did not need)
Sorry for my english.
I was trying to forward port 80 from my vagrant box to host machine (OS X) and got this message
"The forwarded port to 80 is already in use on the host machine."
So, in order to figure out which program uses port 80 i ran this:
➜ ~ sudo lsof -n -i:80 | grep LISTEN
➜ ~
However, as you can see, it shows nothing.I have also tried netstat, but result was the same. Then i tried to use netcat + tcpdump to look at tcp session:
➜ ~ nc -vvv 127.0.0.1 80
Connection to 127.0.0.1 80 port [tcp/http] succeeded!
➜ ~
In another window:
➜ ~ sudo tcpdump -ni lo0 port 80
Password:
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo0, link-type NULL (BSD loopback), capture size 65535 bytes
00:03:47.019805 IP 127.0.0.1.50666 > 127.0.0.1.80: Flags [S], seq 2187569264, win 65535, options [mss 16344,nop,wscale 4,nop,nop,TS val 194193524 ecr 0,sackOK,eol], length 0
00:03:47.019834 IP 127.0.0.1.80 > 127.0.0.1.50666: Flags [R.], seq 0, ack 2187569265, win 0, length 0
So it looks like the port is closed, because it immediately sent RESET flag, but why did nc show that connection was successful and lsof show nothing.
I'm really confused. Can anyone tell me what is going on, or what am i doing wrong?
I can provide additional information if needed.
Thanks!
Looks like that's firewall reset connection.
Turn off Avast WebShield if it exists.
In amazon ec2, I have 2 instances in a placement group. First node is 172.31.12.76/20, second, 172.31.12.77/20 I can ssh both nodes from my pc. They share the same security group that has got these 2 rules:
Inbound rules:
Type Protocol Port Range Source
SSH TCP 22 0.0.0.0/0
All IMCP All N/A 0.0.0.0/0
(no outbound rules)
Both nodes see to each other in L2:
root#ip-172-31-12-76:~# arp
[...]
ip-172-31-12-77.eu-west ether 0a:ad:5e:e4:12:de C eth0
[...]
root#ip-172-31-12-77:~# arp
[...]
ip-172-31-12-76.eu-west ether 0a:34:a1:17:57:28 C eth0
[...]
iptables are empty on both nodes.
But ping does not work between each other
I have already checked a previous post:
EC2 instances not responding to internal ping
but it does not address the issue. It looks like there are no other similar posts.
Any idea? Thank you very much!
I got the answer; I need to also allow outbound icmp on each host in order to be able to ping both external and internal IPs.
while executing
"snmptrap -v 1 -c public localhost TRAP-TEST-MIB::demotraps localhost 4 0 '' IF-MIB::ifIndex i 1"
on my system,I am getting host ,ip & OID values as
host = localhost.localdomain :ip = UDP: [127.0.0.1]:49109->[127.0.0.1] :OID =DISMAN-EVENT-MIB::sysUpTimeInstance 0:3:12:38.28
But when traps are coming from outside its showing
host = :ip = UDP: [192.168.1.73]:52346->[192.168.1.23]:OID =DISMAN-EVENT-MIB::sysUpTimeInstance 7:1:05:54.27 .
Now its clearly shown above that host value didn't show up ...I want to know why & how it get to be resolve.
Thanks in advance
the one reason is if you are using VMware/virtual OS and you have not configured different IP than your host machine IP.
Simply keep ip & its corresponding host-name in /etc/hosts file..That's All
My /etc/hosts file is-
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.1.150 ZYXEL
192.168.1.73 CISCO
192.168.1.135 DIGISOL