erick00
April 13th, 2024, 08:52 PM
I have a PC running Ubuntu connected to my Mac mini running Sonoma via an ethernet cable. I can log onto the Ubuntu system over the ethernet cable using Microsoft Remote Desktop on the macOS. Therefore I do have connectivity.
However, while I can ping the Ubuntu system from the macOS using ‘ping 192.168.1.2’ successfully when I try to ping the macOS from Ubuntu using ‘ping 192.168.1.3’ it fails with:
PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data.
From 192.168.1.242 icmp_seq=1 Destination Host Unreachable
I searched the internet and tried to fix it by adding two lines to the ufw configuration file /etc/ufw/before.rules. They are shown below but commented out:
# ok icmp codes for INPUT
-A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT
-A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT
-A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT
-A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT
# Allow outbound ICMP Added by My-Name-Redacted
# -A ufw-before-output -p icmp -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
# -A ufw-before-outut -p icmp --icmp-type echo-request -j ACCEPT
# ok icmp code for FORWARD
-A ufw-before-forward -p icmp --icmp-type destination-unreachable -j ACCEPT
-A ufw-before-forward -p icmp --icmp-type time-exceeded -j ACCEPT
-A ufw-before-forward -p icmp --icmp-type parameter-problem -j ACCEPT
-A ufw-before-forward -p icmp --icmp-type echo-request -j ACCEPT
When I uncomment the two rules "ufw-before-output' rules I added to the file and run the command ‘sudo ufw reload’ I get the following:
ERROR: problem running ufw-init
iptables-restore: line 79 failed
Problem running '/etc/ufw/before.rules'
Line 79 is the last line in the file which just says 'COMMIT'
Do you have a suggestion why I still cannot ping my macmini from Ubuntu?
Also note that I can ping the macOS system from Ubuntu if I ping to the wifi address of the mac as in ‘ping 192.168.1.176’.
However, while I can ping the Ubuntu system from the macOS using ‘ping 192.168.1.2’ successfully when I try to ping the macOS from Ubuntu using ‘ping 192.168.1.3’ it fails with:
PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data.
From 192.168.1.242 icmp_seq=1 Destination Host Unreachable
I searched the internet and tried to fix it by adding two lines to the ufw configuration file /etc/ufw/before.rules. They are shown below but commented out:
# ok icmp codes for INPUT
-A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT
-A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT
-A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT
-A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT
# Allow outbound ICMP Added by My-Name-Redacted
# -A ufw-before-output -p icmp -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
# -A ufw-before-outut -p icmp --icmp-type echo-request -j ACCEPT
# ok icmp code for FORWARD
-A ufw-before-forward -p icmp --icmp-type destination-unreachable -j ACCEPT
-A ufw-before-forward -p icmp --icmp-type time-exceeded -j ACCEPT
-A ufw-before-forward -p icmp --icmp-type parameter-problem -j ACCEPT
-A ufw-before-forward -p icmp --icmp-type echo-request -j ACCEPT
When I uncomment the two rules "ufw-before-output' rules I added to the file and run the command ‘sudo ufw reload’ I get the following:
ERROR: problem running ufw-init
iptables-restore: line 79 failed
Problem running '/etc/ufw/before.rules'
Line 79 is the last line in the file which just says 'COMMIT'
Do you have a suggestion why I still cannot ping my macmini from Ubuntu?
Also note that I can ping the macOS system from Ubuntu if I ping to the wifi address of the mac as in ‘ping 192.168.1.176’.