LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-26-2022, 05:10 AM   #1
fmillion
Member
 
Registered: Nov 2006
Posts: 93

Rep: Reputation: 27
Kubuntu 21.10: All TCP ports return ICMP admin-prohibited, can't access open ports.


Running an up-to-date installation of Kubuntu 21.10.

If I run any network service on the machine, I'm unable to reach it from anywhere else on my network. The error is always "Host unreachable". A tcpdump scan reveals the SYN packet does reach the host, but an ICMP "admin-prohibited" packet is immediately sent back. The packet never even reaches iptables (verified by adding a rule that would match a connection, and it's counter never increases)

nmap is also unable to detect the port as open, however its scan does show up in the counter. nmap interprets the port as filtered because the prohibited packet is ICMP; no response to the SYN packet is sent.

Here is the tcpdump output (scanner is 192.168.1.3, host with services is 192.168.1.183), on the host machine with a service actively listening on port 8000, that appears when another machine tries to connect:

Code:
    04:43:09.154362 IP 192.168.1.3.56608 > 192.168.1.183.8000: Flags [S], seq 3664350430, win 64240, options [mss 1460,sackOK,TS val 2819866111 ecr 0,nop,wscale 7], length 0
    04:43:09.154417 IP 192.168.1.183 > 192.168.1.3: ICMP host 192.168.1.183 unreachable - admin prohibited filter, length 68
Here is what happens when nmap scans:

Code:
    04:44:49.060156 ARP, Request who-has 192.168.1.183 tell 192.168.1.3, length 46
    04:44:49.060177 ARP, Reply 192.168.1.183 is-at 74:e6:e2:da:19:0f, length 28
    04:44:49.156156 IP 192.168.1.3.33094 > 192.168.1.183.8000: Flags [S], seq 4114316293, win 1024, options [mss 1460], length 0
    04:44:49.156260 IP 192.168.1.183 > 192.168.1.3: ICMP host 192.168.1.183 unreachable - admin prohibited filter, length 52
iptables is completely clear, ACCEPT policy on all default chains, no rules whatsoever on filter. nat and mangle.

Services can be accessed locally using localhost or the machine's IP on the machine itself. The only issue is trying to access from the network.

I do have Docker on the machine, but for trying to figure this out, I disabled Docker and removed all of its iptables rules and chains. Docker services are able to be reached from the network.

The machine also has VirtualBox installed, if that's relevant, but at the time of testing no VirtualBox machines were running.

Also of important note is that the SSH server running on the host can be reached successfully - this is the only service that is reachable, regardless of what else is running:

Code:
    Starting Nmap 7.91 ( https://nmap.org ) at 2022-01-26 11:00 UTC
    Nmap scan report for 192.168.1.183
    Host is up (0.00035s latency).
    Not shown: 65534 filtered ports
    PORT      STATE SERVICE
    22/tcp    open  ssh
    MAC Address: redacted
    Too many fingerprints match this host to give specific OS details

    Nmap done: 1 IP address (1 host up) scanned in 78.45 seconds
Is there perhaps a kernel setting somewhere that is causing this to occur?

Thanks for any help!
 
Old 01-27-2022, 02:44 AM   #2
beka
LQ Newbie
 
Registered: Dec 2021
Posts: 21

Rep: Reputation: Disabled
Hi fmillion,

What does your routing table show? I would assume your machines are connected through a simple switch - since they are on the same subnet?

Best

Last edited by beka; 01-27-2022 at 02:55 AM.
 
Old 01-27-2022, 03:07 AM   #3
beka
LQ Newbie
 
Registered: Dec 2021
Posts: 21

Rep: Reputation: Disabled
I think it is possible Kubuntu 21.10 is using nftables, looking things up someone had a similar problem and it was because nftables was being used with no rules being displayed by iptables.(https://unix.stackexchange.com/quest...being-rejected)

Best
 
Old 01-28-2022, 01:13 AM   #4
fmillion
Member
 
Registered: Nov 2006
Posts: 93

Original Poster
Rep: Reputation: 27
Quote:
Originally Posted by beka View Post
I think it is possible Kubuntu 21.10 is using nftables, looking things up someone had a similar problem and it was because nftables was being used with no rules being displayed by iptables.(https://unix.stackexchange.com/quest...being-rejected)

Best
That was it! Based on that post, executing

Code:
sudo systemctl disable --now firewalld
worked and now I can connect to services running on the machine.

I'll have to read up more on nftables at some point, but it's kinda confusing that iptables is "blind" to it, and since iptables is kernel-level you think it'd have the highest priority.
 
Old 05-16-2024, 01:28 PM   #5
philwhiteuk
LQ Newbie
 
Registered: May 2024
Location: Meopham, Kent, UK
Distribution: Fedora
Posts: 1

Rep: Reputation: 0
unreachable - admin prohibited

Reply to an old post.

I had the same problem with vsftpd on Fedora 36. The 'systemctl disable firewalld' solved the problem. Thanks.
 
Old 05-27-2024, 01:46 AM   #6
Pentium4User
Member
 
Registered: Jan 2018
Posts: 82

Rep: Reputation: Disabled
The proper way to handle that is to configure the firewalld service.
Code:
sudo firewall-cmd --remove-port=22/tcp
sudo firewall-cmd --runtime-to-permanent
This will open the FW on TCP/22 for all addresses.
For individual addresses, rich-rules can be used.
https://access.redhat.com/documentat...anguage_syntax
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
icmp 68: host anos unreachable - admin prohibited keraj37 Linux - Networking 6 09-22-2014 04:15 PM
ICMP Destination Unreachable (Host administratively prohibited) jiml8 Linux - Networking 7 04-25-2013 04:07 AM
[SOLVED] CentOS 5.8 NAT router icmp unreachable admin prohibited problem kenneth_phough Linux - Networking 6 08-09-2012 08:14 AM
admin prohibited?? jay123 Linux - Networking 2 07-10-2006 08:04 AM
icmp - host adminstratively prohibited? richyankee2005 Linux - Networking 1 02-24-2005 09:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration