Can ping 8.8.8.8 but not other IP - networking

We have some networking issue on a Raspberry Pi and a 4G dongle. The same buildroot image on other Raspberry Pi with another 4G dongle is working fine. However on this Raspberry Pi + dongle setup:
PPP can establish connection and create a ppp0 interface
Can ping 8.8.8.8
When ping google.com, it can find IP address, but ping cannot go through, with 100% failure.
Directly ping the found google.com IP also failed. Tried other domain names and IP as well. Internet like HTTP are also not working.
In /etc/resolv.conf, the nameserver looks correct, it is in same network as the ppp0 IP assigned by ISP. Anyway if the "ping google.com" can find IP address, I think the DNS is working fine.
routing table is also correct, there is only ppp0 routes in the table.
My question is, what could be the root cause of this issue and how to solve it? Or what test do you suggest for me to identify the root cause? Thanks!

It terms out that the APN we use is a Shared Internet APN rather than a public APN, which means The service provider only whitelists some IP addresses for us to access with this APN.

Related

Accessing connected devices to a local network wirelessly

Hello Everyone!
I want to know that is there any way to access a photocopier machine which is connected to a computer through Ethernet wire and that computer is connected to my WiFi network?
P.S: What if I don't know the IP assigned to that Photocopier machine?
If the wireless network is part of the wired network you should have any problem reaching the photocopier.
If you don't know the IP address, you can reach it by host name if the DHCP and DNS are working properly. If you are on an Active Directory infrastructure and DHCP and DNS are integrated it should be transparent.
If you are on your home with a "home" router they usually do the hostname to IP resolve (DNS).
You can nslookup hostname in your machine to see if your dns is resolving the ip address. you can also ping hostname or ping ip address to test that you can reach the desired host. Some hosts block ping (ICMP) requests, please note that ping is ping does not respond is not a definitive solution.
Please note that in your home router you should use your router or default gateway to be the DNS also, and then add the google public DNS or your ISP.
Also when connecting the access point to an existing network you may have 2 DHCP servers providing IP addresses to hosts, you should disable DHCP on the Access Point and connect the AP to the network using the switch port and not the WAN port (the WAN port will try to do NAT and assign a different set of IP addresses).

IP address is not reachable or is invalid

I am facing a strange issue these days. I have a list of IP addresses which I want to connect to during the deployment using Jenkins. Now what is happening is, if I am deploying at one IP address (remote machine but in same location) in my local location server, I can successfully do that. But If I am trying to deploy to an IP address (remote machine in other country/region) It is throwing the error, saying
Error : Ip address XYZ is not reachable or is invalid.
Please be notified that I am able to get the response from the machine when I ping it using:
ping XYZ
But while trying to deploy on it using Jenkins, I am not.
Please let me know if there's any solution for this problem.
There isn't enough data points but you can look for these things
1. IP address, Check if all three machines are in same n/w (Jenkins Server, target and your machine)
You can check it with IP address of each machine
2. check Gateway set for Jenkins server
3. Best way if feasible is to ssh / rdp to your Jenkins server and try running your command manually that will give you
Local machine get loopback address(127.0.0.1), so it will be reachable or any local machine having IP address with same subnet mask thats called LAN.
When you are reaching out to remote machine, either it should be public IP address(visible to everyone in the world) or you must have connect to that Area-Network via VPN, this is called tunnelling to remote over the WAN (wide area network). Their(remote location) again, you will notice that all the IP address have same subnet mask as you have on the local machine.
So their could be be IP address duplication case in VPN scenario, where you are bale to ping but not able to reach. This is because, IP address is assigned to other machine but not you yours and ping responses are coming from that other machine. That means your machine is in failed to resolve ARP and in dormant state.

CentOS - Wrong automatic ifconfig broadcast address

Running a Centos 5.11 machine with two network cards.
One is facing the internal network (private IP), the other the Internet (public IP).
Because we had some issues lately with it (ARP collision - but that's not the point here!), I started verifying its config. And I find out the broadcast set for the public IP is wrong.
IP is xxx.xxx.xxx.25
Subnet is 255.255.255.240
So basically we should have:
Network xxx.xxx.xxx.16
First IP xxx.xxx.xxx.17
Last IP xxx.xxx.xxx.30
Broadcast xxx.xxx.xxx.31
But the broadcast is automatically set to last host xxx.xxx.xxx.30
If I change it using command line, it is reseted back to the same IP once I do a service network restart...
I had to edit /etc/sysconfig/network-scripts/ifcfg-eth0 for the broadcast to stick to what I wanted.

Setting a networked pc to keep its IP

Is it possible to have one of our networked PC's to keep using the same IP address (192.168.1.54) so that if the master computer or a failure / shutdown etc happens then the system IP addresses are not reset so i don't have to update all the other pc's hosts files to this PC's new IP address?
You will need to make a reservation based on the MAC address of your network card. You can find this by typing "ipconfig /all" inside the command prompt.
The IP addresses can be reserved on your router or on your server depending on how they are distributed.
You should solve this in the DHCP server (typically in your router), make a reserved IP for the mac-address of the PC in question. Or you configure the PC to not use DHCP but configure a fixed IP. But that should be, if possible, an IP that is not in the DHCP range.

dnsmasq resolve DNS queries normally

I'm new to dnsmasq and networking isn't my strong point, hopefully i'm missing something simple.
I have a Ubuntu laptop running dnsmasq. The laptop's WiFi is connected to the Internet, the laptop's ethernet is connected to a LAN.
Plugging my machine into the LAN I am assigned an IP address by the laptop. Accessing www.google.com on my machine gets picked up the laptop and i'm served the laptops Apache page, which is my desired result. The problem is I can't access any other website, Destination Host Unreachable.
I'd like the laptop running dnsmasq to allow my machine to resolve DNS queries normally and only be restricted when accessing www.google.com.
My dnsmasq.conf is the default except:
address=/www.google.com/192.168.0.1
interface=eth0
dhcp-range=192.168.0.50,192.168.0.150,12h
I've a feeling it might be related to the IP settings on each network?
The WiFi has a static IP 192.168.1.55 taking to the router at 192.168.1.1 and the DNS server at 192.168.1.10.
The ethernet is configured manually with an IP 192.168.0.1 setting the router as the WiFi IP 192.168.1.55 and the same for the DNS server 192.168.1.55.
Thanks in advance for any help.
Pete
After a lot of fiddling, this was related to iptables and not dnsmasq.

Resources