Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Client has DNS but no TCP/IP access when connected to Debian host via WiFi

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
debian_wifi_user
Posts: 22
Joined: 2019-11-19 08:47
Has thanked: 4 times

Client has DNS but no TCP/IP access when connected to Debian host via WiFi

#1 Post by debian_wifi_user »

I have used NetworkManager to create a "Wi-Fi (shared)" connection as my Debian machine is connected to the internet with a wired connection and I want to share that internet connection with other WiFi devices.

I can connect to the Debian machine over WiFi from an Ubuntu "client" and can ping the Debian access point. I can also ping google.com from the Ubuntu client.

Unfortunately the Ubuntu machine cannot actually connect to any websites. All it can do is ping domains. EDIT: The ping does not actually work - only the domain resolving works. Sorry for my confusion.

What is wrong with my setup? I have the defaults set and was hoping that the NetworkManager wizard would "just work". ;-)
Last edited by debian_wifi_user on 2022-01-17 00:16, edited 1 time in total.

User avatar
argentwolf
Posts: 201
Joined: 2021-09-05 23:21
Has thanked: 185 times
Been thanked: 15 times

Re: Client has DNS but no TCP/IP access when connected to Debian host via WiFi

#2 Post by argentwolf »

You do have a Wireless Access Point (WAP) or you're trying to make your Debian machine with a wireless NIC a WAP?

https://wiki.debian.org/NetworkManager
Vanguard Debian, because nothing's worse than doing nothing, whimsically!
32-bit | 2 Duo T5270 @ 1.40GHz x 2 CPU | 3.9GiB RAM | NV86 117MiB GPU | 465.76GiB SSD
64-bit | i7-4790 @ 3.60GHz x 8 CPU | 15.6GiB RAM | NVD9 1.9GiB GPU | 931.51GiB SSD

reinob
Posts: 1189
Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 45 times

Re: Client has DNS but no TCP/IP access when connected to Debian host via WiFi

#3 Post by reinob »

If you can "ping domains" from your Ubuntu client it means that both DNS resolution and routing should be working fine.

Can you actual resolve domains, or have you pinged 1.1.1.1 or 8.8.8.8 or such?
If domain resolution does NOT work (check with e.g. "host www.google.com"), have a look at your /etc/resolv.conf (again, in your client, not at the debian host).

User avatar
ralph.ronnquist
Posts: 342
Joined: 2015-12-19 01:07
Location: Melbourne, Australia
Been thanked: 6 times

Re: Client has DNS but no TCP/IP access when connected to Debian host via WiFi

#4 Post by ralph.ronnquist »

You might need to tell the debian machine kernel that forwarding is ok, by

Code: Select all

# sysctl net.ipv4.ip_forward=1
And for convenience you might also want to add the setting into a file in /etc/systctl.d/

debian_wifi_user
Posts: 22
Joined: 2019-11-19 08:47
Has thanked: 4 times

Re: Client has DNS but no TCP/IP access when connected to Debian host via WiFi

#5 Post by debian_wifi_user »

argentwolf wrote: 2022-01-14 00:03 You do have a Wireless Access Point (WAP) or you're trying to make your Debian machine with a wireless NIC a WAP?

https://wiki.debian.org/NetworkManager
I want to setup my Debian machine as a wireless access point.

debian_wifi_user
Posts: 22
Joined: 2019-11-19 08:47
Has thanked: 4 times

Re: Client has DNS but no TCP/IP access when connected to Debian host via WiFi

#6 Post by debian_wifi_user »

reinob wrote: 2022-01-14 07:32 If you can "ping domains" from your Ubuntu client it means that both DNS resolution and routing should be working fine.

Can you actual resolve domains, or have you pinged 1.1.1.1 or 8.8.8.8 or such?
If domain resolution does NOT work (check with e.g. "host www.google.com"), have a look at your /etc/resolv.conf (again, in your client, not at the debian host).
I cannot ping 1.1.1.1 from the Ubuntu client.

If I ping google.com, it resolves the IP address but the ping fails. Sorry for my original post where I said I could ping domains - I cannot. All I see is it resolve the domain and fail to ping.

debian_wifi_user
Posts: 22
Joined: 2019-11-19 08:47
Has thanked: 4 times

Re: Client has DNS but no TCP/IP access when connected to Debian host via WiFi

#7 Post by debian_wifi_user »

ralph.ronnquist wrote: 2022-01-14 09:37 You might need to tell the debian machine kernel that forwarding is ok, by

Code: Select all

# sysctl net.ipv4.ip_forward=1
And for convenience you might also want to add the setting into a file in /etc/systctl.d/
I tried this but it didn't change anything alas.

User avatar
ralph.ronnquist
Posts: 342
Joined: 2015-12-19 01:07
Location: Melbourne, Australia
Been thanked: 6 times

Re: Client has DNS but no TCP/IP access when connected to Debian host via WiFi

#8 Post by ralph.ronnquist »

And then you probably also need the debian machine to masquerade the network traffic, which you'd do as follows with iptables installed and assuming your Ethernet interface name is ens5:

Code: Select all

# iptables -t nat -A POSTROUTING -o ens5 -j MASQUERADE

debian_wifi_user
Posts: 22
Joined: 2019-11-19 08:47
Has thanked: 4 times

Re: Client has DNS but no TCP/IP access when connected to Debian host via WiFi

#9 Post by debian_wifi_user »

ralph.ronnquist wrote: 2022-01-17 05:31 And then you probably also need the debian machine to masquerade the network traffic, which you'd do as follows with iptables installed and assuming your Ethernet interface name is ens5:

Code: Select all

# iptables -t nat -A POSTROUTING -o ens5 -j MASQUERADE
Thanks a lot. This almost got me there. I ran this command and it said:

Code: Select all

iptables v1.8.7 (nf_tables):  CHAIN_ADD failed (Operation not supported): chain POSTROUTING
After finding this link https://raspberrypi.stackexchange.com/q ... supported , I ran this command first:

Code: Select all

 # update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in manual mode
And now it all works. Thanks again.

User avatar
argentwolf
Posts: 201
Joined: 2021-09-05 23:21
Has thanked: 185 times
Been thanked: 15 times

Re: Client has DNS but no TCP/IP access when connected to Debian host via WiFi

#10 Post by argentwolf »

Huh! 'Raspberry Pi' is important information given at the beginning of your request for help...
Vanguard Debian, because nothing's worse than doing nothing, whimsically!
32-bit | 2 Duo T5270 @ 1.40GHz x 2 CPU | 3.9GiB RAM | NV86 117MiB GPU | 465.76GiB SSD
64-bit | i7-4790 @ 3.60GHz x 8 CPU | 15.6GiB RAM | NVD9 1.9GiB GPU | 931.51GiB SSD

debian_wifi_user
Posts: 22
Joined: 2019-11-19 08:47
Has thanked: 4 times

Re: Client has DNS but no TCP/IP access when connected to Debian host via WiFi

#11 Post by debian_wifi_user »

argentwolf wrote: 2022-01-18 14:05 Huh! 'Raspberry Pi' is important information given at the beginning of your request for help...
Why? I'm not using a Raspberry Pi.

User avatar
argentwolf
Posts: 201
Joined: 2021-09-05 23:21
Has thanked: 185 times
Been thanked: 15 times

Re: Client has DNS but no TCP/IP access when connected to Debian host via WiFi

#12 Post by argentwolf »

My bad! :oops:
Vanguard Debian, because nothing's worse than doing nothing, whimsically!
32-bit | 2 Duo T5270 @ 1.40GHz x 2 CPU | 3.9GiB RAM | NV86 117MiB GPU | 465.76GiB SSD
64-bit | i7-4790 @ 3.60GHz x 8 CPU | 15.6GiB RAM | NVD9 1.9GiB GPU | 931.51GiB SSD

Post Reply