LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-11-2018, 06:28 PM   #16
Dylan_Oscar
LQ Newbie
 
Registered: Nov 2017
Location: Sydney, Australia
Distribution: Ubuntu, Mint
Posts: 16

Original Poster
Rep: Reputation: Disabled

I have just tried pinging my laptop from the desktop, and it worked. I got 0% packet loss. However the browser on my desktop is unable to visit the server on my laptop. When I enter the laptop's IP address in the URL bar, it is unable to connect.
I ran nmap and it stated that port 80 is open for http.
I do not have a file or directory in /var/log called messages. I have checked the other log files and haven't found any evidence of the pings.
This is the result of
Code:
ls /var/log
:
Code:
alternatives.log    apport.log.3.gz  auth.log.1     cups            fsck             kern.log.2.gz          ntpstats             syslog.1     tallylog
alternatives.log.1  apport.log.4.gz  auth.log.2.gz  dmesg           gpu-manager.log  lastlog                php7.0-fpm.log       syslog.2.gz  upstart
apache2             apport.log.5.gz  boot.log       dpkg.log        gufw.log         libvirt                php7.0-fpm.log.1     syslog.3.gz  wtmp
apparmor            apt              bootstrap.log  dpkg.log.1      hp               lightdm                php7.0-fpm.log.2.gz  syslog.4.gz  wtmp.1
apport.log          aptitude         btmp           faillog         installer        mintsystem.log         samba                syslog.5.gz  Xorg.0.log
apport.log.1        aptitude.1.gz    btmp.1         firewalld       kern.log         mintsystem.timestamps  speech-dispatcher    syslog.6.gz  Xorg.0.log.old
apport.log.2.gz     auth.log         ConsoleKit     fontconfig.log  kern.log.1       mysql                  syslog               syslog.7.gz
Is one of these relevant?
I did find the following entry in syslog after disabling apparmor:
Code:
Feb 12 11:14:12 dylanuszwei-Satellite-P750 systemd[1]: Stopping LSB: AppArmor initialization...
Feb 12 11:14:12 dylanuszwei-Satellite-P750 apparmor[10500]:  * Clearing AppArmor profiles cache
Feb 12 11:14:12 dylanuszwei-Satellite-P750 apparmor[10500]:    ...done.
Feb 12 11:14:12 dylanuszwei-Satellite-P750 apparmor[10500]: All profile caches have been cleared, but no profiles have been unloaded.
Feb 12 11:14:12 dylanuszwei-Satellite-P750 apparmor[10500]: Unloading profiles will leave already running processes permanently
Feb 12 11:14:12 dylanuszwei-Satellite-P750 apparmor[10500]: unconfined, which can lead to unexpected situations.
Feb 12 11:14:12 dylanuszwei-Satellite-P750 apparmor[10500]: To set a process to complain mode, use the command line tool
Feb 12 11:14:12 dylanuszwei-Satellite-P750 apparmor[10500]: 'aa-complain'. To really tear down all profiles, run the init script
Feb 12 11:14:12 dylanuszwei-Satellite-P750 apparmor[10500]: with the 'teardown' option."
Feb 12 11:14:12 dylanuszwei-Satellite-P750 systemd[1]: Stopped LSB: AppArmor initialization.
Since it is leaving the profiles in place, is it possible that apparmor is still blocking access? From what I understand apparmor functions similarly to SELinux. I would think disabling it would be all I need to do, but perhaps it is still doing something in the background.
Let me know if you need me to post any more information up here.
 
Old 02-12-2018, 04:13 AM   #17
baldur_1
Member
 
Registered: Sep 2010
Posts: 275

Rep: Reputation: 28
okay, so that could be significant but i dont know enough about apparmor and the logs to say for certain.

first on the laptop run...

Code:
netstat -tulpn
then paste the results here. that will tell every program that is running listening for an outside connection and which port it is listening on.

also, i dont know what apparmor does specifically but if that might be the issue then you should use this guide to stop apparmor and make sure it does not start...

stopping apparmor

specifically...

this one stops it as a current running process
Code:
sudo /etc/init.d/apparmor stop
this one removes it from starting up with the pc
Code:
sudo update-rc.d -f apparmor remove
both need to be used to stop it from starting & running. you can always re-add it to auto start if you chose but for finding the issue, stop it for now.
 
Old 02-12-2018, 04:20 AM   #18
Dylan_Oscar
LQ Newbie
 
Registered: Nov 2017
Location: Sydney, Australia
Distribution: Ubuntu, Mint
Posts: 16

Original Poster
Rep: Reputation: Disabled
I ran netstat -tulpn as root and these are the results. I only see one entry for apache. Is it running on IPv6?

Code:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      2278/mysqld     
tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      3084/dnsmasq    
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      2864/dnsmasq    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1721/sshd       
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      4786/cupsd      
tcp        0      0 0.0.0.0:17500           0.0.0.0:*               LISTEN      3521/dropbox    
tcp        0      0 127.0.0.1:17600         0.0.0.0:*               LISTEN      3521/dropbox    
tcp        0      0 127.0.0.1:12546         0.0.0.0:*               LISTEN      5924/cli        
tcp        0      0 127.0.0.1:17603         0.0.0.0:*               LISTEN      3521/dropbox    
tcp        0      0 127.0.0.1:46309         0.0.0.0:*               LISTEN      5924/cli        
tcp6       0      0 :::80                   :::*                    LISTEN      2132/apache2    
tcp6       0      0 :::22                   :::*                    LISTEN      1721/sshd       
tcp6       0      0 ::1:631                 :::*                    LISTEN      4786/cupsd      
tcp6       0      0 :::17500                :::*                    LISTEN      3521/dropbox    
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1277/avahi-daemon: 
udp        0      0 192.168.122.1:53        0.0.0.0:*                           3084/dnsmasq    
udp        0      0 127.0.1.1:53            0.0.0.0:*                           2864/dnsmasq    
udp        0      0 0.0.0.0:67              0.0.0.0:*                           3084/dnsmasq    
udp        0      0 0.0.0.0:68              0.0.0.0:*                           19533/dhclient  
udp        0      0 192.168.0.9:123         0.0.0.0:*                           2005/ntpd       
udp        0      0 127.0.0.1:123           0.0.0.0:*                           2005/ntpd       
udp        0      0 0.0.0.0:123             0.0.0.0:*                           2005/ntpd       
udp        0      0 0.0.0.0:45542           0.0.0.0:*                           1277/avahi-daemon: 
udp        0      0 0.0.0.0:631             0.0.0.0:*                           4787/cups-browsed
udp        0      0 0.0.0.0:45978           0.0.0.0:*                           2864/dnsmasq    
udp        0      0 0.0.0.0:17500           0.0.0.0:*                           3521/dropbox    
udp6       0      0 :::5353                 :::*                                1277/avahi-daemon: 
udp6       0      0 :::52404                :::*                                1277/avahi-daemon: 
udp6       0      0 fe80::8ebd:9465:e21:123 :::*                                2005/ntpd       
udp6       0      0 ::1:123                 :::*                                2005/ntpd       
udp6       0      0 :::123                  :::*                                2005/ntpd
I also ran the command you provided to stop apparmor, but was still unable to access the site from my phone.
 
Old 02-13-2018, 05:36 AM   #19
baldur_1
Member
 
Registered: Sep 2010
Posts: 275

Rep: Reputation: 28
okay, something is going on here and i have no idea what specifically. i can see from the netstat output that apache is listening. from your log it told me you have it set to require all granted and you can reach it from localhost. so apache is nearly for certain not the issue. there is NO WAY the issue is on the side of the phone because that is the simple part but if when you set it on LOGLEVEL=debug and you dont see a reference to the phones request in the log then there is something clearly intercepting the request from the phone on the laptop.

i dont know if you know this but you have to use BOTH commands. one command only stopd apparmor temporarily but you want it stopped and disabled.

1. you need to stop it,
2. disable it from starting on boot,
3. restart your computer
4. check your bootlog to make sure it did not start

look in your boot log and see if there is a reference to apparmor or something in there. also check your sys log to see if there is any reference in there.

by everything i see it should work so i dont know. i would specifically go to a mint forum (i think there is a mint forum on linuxquestions) and ask someone there because maybe there is something specific to mint that is blocking it...
 
Old 02-13-2018, 05:03 PM   #20
Dylan_Oscar
LQ Newbie
 
Registered: Nov 2017
Location: Sydney, Australia
Distribution: Ubuntu, Mint
Posts: 16

Original Poster
Rep: Reputation: Disabled
I've disabled apparmor to prevent it from starting at boot. I rebooted and confirmed that apparmor did not turn back on again, but that did not resolve the issue.
I've posted this on the Mint forum now. I will let you know if I get an answer. Thanks for all your help.
 
Old 02-19-2018, 02:46 AM   #21
Dylan_Oscar
LQ Newbie
 
Registered: Nov 2017
Location: Sydney, Australia
Distribution: Ubuntu, Mint
Posts: 16

Original Poster
Rep: Reputation: Disabled
Just an update for anyone looking at this post. I have now successfully accessed a localhost on a Mac on the same network from my phone, so the router settings are not the issue, which I thought they might be for a while.
I have posted this question on the Mint forum and on superuser.com, but I have not received a response yet. If anyone does know of a solution, I would be very eager to hear it, but for now it looks like I can't use this laptop for mobile testing.
 
  


Reply

Tags
iphone, localhost



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
Unable to access iPhone -- Unhandled Lockdown error (-16) ?? nixtr Linux - Newbie 13 03-22-2017 09:17 AM
Changed my root user access for mysql access to Any from localhost SSBN Linux - Server 2 03-14-2011 02:25 PM
How to access localhost ...... thomas2004ch Linux - Newbie 3 10-20-2009 09:06 AM
cannot access localhost Rick809 Linux - Networking 3 08-02-2006 11:27 AM
Not getting Localhost access for CUPS JaseP Linux - Networking 3 12-16-2002 12:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:48 PM.

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