Linux wireless AP associated but no internet and can’t ping IPs

hackr

New Member
Joined
May 2, 2022
Messages
4
Reaction score
0
Credits
49
This is a fresh install of IPFire v2 current release. The upstream AP has Internet access and works with any other connected device.
The WiFi adapter is associated with a wireless AP. This is the “red” (Internet / WAN facing) network. Ethernet is used for the green (LAN) network. A client connected to the laptop running IPFire is able to communicate with IPFire.

Neither the wired client nor the laptop with IPFire itself can ping any IP or domain name on the Internet.

wpa_supplicant was used to connect to the AP. At first there was no ipv4 address assigned to the red0 (wireless) interface but at this point I have added it manually.
I have exhausted all known troubleshooting steps: restarting everything, DHCP operations, changing the default gateway, wpa_supplicant.conf options, /etc/networks/interfaces options, etc, etc.

Any guidance would be greatly appreciated…


red0: flags=4173<UP, BROADCAST, RUNNING, MULTICAST> mtu 1500
inet 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255
ether 00:xx:xx:xx:xx tqueuelen 1000 (Ethernet)
RX packets 7686 bytes 164093 (1.5 Mb)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 82 bytes 7579 (7.4 Kb)
TX errors 0 dropped 0 carrier 0 collisions 0

As for DNS, IPFire is designed to set itself as the DNS nameserver and to provide a proxy to your upstream ISP DNS. This is fine for the moment and further after 2 days of troubleshooting I added secondary DNS servers like 1.1.1.1, which has no effect. I don’t think it’s a DNS problem because I also can’t ping IPs like 1.1.1.1 or 8.8.8.8
 


dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,451
Reaction score
1,058
Credits
8,970
What is your default route? What is the output of..

netstat -nr | grep UG

Are you using a static IP or DHCP? If it's static, you will manually have to
set your DNS addresses.
Can you ping your router? If you can, it might be a firewall issue.
Some ISPs don't allow ICMP pass-thru. (ping) I don't know about IPFire.

192.168.1.x is a non-routable IP address. So in order to go out to the internet
this is probably NAT'd (Network address translated) to another IP address.

So even if you can't ping google. Can you browse to google with browser?
One way to check what your external (NAT'd) IP address is...
 
Last edited:
OP
H

hackr

New Member
Joined
May 2, 2022
Messages
4
Reaction score
0
Credits
49
@dos2unix Thanks for your reply!

So that command didn’t return anything. If I omit the grep then it gives me the kernel routing table with 2 entries: red0, green0 both with 192.168.1.0 as the Destination and 0.0.0.0 as Gateway. Both entries have a U flag.

I can ping the IPFire router address. I can ping the router and the LAN (this Linux installation itself is a router - I can ping up and down stream locally) but nothing on the internet. The Linux installation is headless but the client can’t browse and curl also fails.

Currently it is set to use DHCP. Im not sure if it’s working. There originally was no ipv4 address showing on red0 (WiFi) in the ifconfig output. I used the ifconfig command with options to set the IP. I’m not sure if that was the right thing to do; didn’t seem to fix the problem.
 

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,451
Reaction score
1,058
Credits
8,970
What distro are you using? Some distro's don't use ifconfig anymore. Most don't use the ifcfg-intrface files anymore.
NetworkManager takes care of this in most newer distro's.

If there is no UG, then you don't have a default gateway. U simply means a route is up.
Can you send output of ..

nmcli con show

(That will tell us if you are using NetworkManager).
 
OP
H

hackr

New Member
Joined
May 2, 2022
Messages
4
Reaction score
0
Credits
49
It’s IPFire v2, which is based on Linux From Scratch.

It doesn’t have nmcli or network manager. The ifconfig command works but yea there’s no gateway.

I tried manually assigning a gateway IP with route once but that didn’t solve the problem (I probably didn’t set it to the correct IP…).
 

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,451
Reaction score
1,058
Credits
8,970
OK, if you're really using the old Networkd.
You probably have a directory /etc/sysconfig/network-scripts
In this directory are some files that start with "ifcfg"

You know your interface name from running ifconfig.
So find the matching ifcfg-(interface name) file.

You want to edit this. Make it look like this, but leave out the comments
at the end of each line.

DEVICE=enp1s0 (whatever your interface name is)
BOOTPROTO=none
ONBOOT=yes
PREFIX=24 ( this is the same as 255.255.255.0 )
IPADDR=192.168.1.2 (whatever your IP is supposed to be)
GATEWAY= ( I would guess it's probably 192.168.1.1)
IPV6INIT=no
DNS1=8.8.8.8
DNS2=9.9.9.9

ifdown eth0 (or whatever your interface is)
ifup eth0
 
Last edited:
OP
H

hackr

New Member
Joined
May 2, 2022
Messages
4
Reaction score
0
Credits
49
Thank you for that! I didn’t have time after work to try today but I will give it a go tomorrow and let you know.

I don’t think this version of Linux uses that folder but I think I may know where there’s a file like that. I think maybe I set the gateway wrong when I tried before, so this may help. Thanks again!
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top