LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Seems a silly question but, how do I make LAN wifi talk to my computer? (https://www.linuxquestions.org/questions/linux-newbie-8/seems-a-silly-question-but-how-do-i-make-lan-wifi-talk-to-my-computer-4175639756/)

dedec0 10-04-2018 06:51 PM

Seems a silly question but, how do I make LAN wifi talk to my computer?
 
My computer has cable Internet, which reaches it with a modem, which has wifi. It has Debian installed.

When someone with a mobile phone comes here, she may use Internet in my wifi. Very easy.

Now I want to communicate the two systems. I have been fighting this "problem" (quotes because it seems it should be something easy) for a few days.

My computer has a chosen and known IPv4. But I cannot access it in a browser, neither in my computer itself, nor in a phone using the wifi. I can SSH to my LAN IP, but not view it in the browser. Why? Installing apache for this seems to be using a missile to destroy an ant.

To communicate with droids here (rooted androids or not), and other mobile phones, what should I use? A remote server with some comm service?

If basic things about mobile phones are missing in what I wrote, it is because I do not know them. Please tell them to me. Searching information in the web is not easy because maaaaaaany different situations are kind of similar, and I find it hard to decide what should be good, and what is bad or unrelated.

scasey 10-04-2018 07:06 PM

In order to "view something in a browser" the computer must be running a web server, so installing apache or some other web server is, in fact, what you'd need to do.
ssh is one "service" usually on port 22.
Web browsers connect to a web "service" on port 80 or (for https) port 443.
Each requires its own software.

I'm not sure what you mean by "communicate with droids" Please expand on that.

frankbell 10-04-2018 08:46 PM

If the phone is an Android, you can view it from your computer's browser, upload and download files, and the like, with Airdroid; it's in the Play store. You do not need an Airdroid account to use it locally.

There are some file managers that are capable of seeing shared directories on file servers in the Play store. ES File Explorer is one such, if memory serves.

michaelk 10-04-2018 09:56 PM

Quote:

Now I want to communicate the two systems
Define communicate. What are you trying to accomplish? Do you want to run commands on the server from your phone? Do you want to transfer files? frankbell has posted a couple of good apps.

You installed apache but you also need to make sure its running and the firewall allows web traffic i.e port 80 as posted. Most distributions should have a default web page i.e index.html but make sure it exists.

dedec0 10-04-2018 11:52 PM

Before everything, I thank you all for your comments and attention.
(:

Below I comment each post until now.

@ #2:

I have a vague memory of computers having default (or shipped with) things that could serve as basic sites (static HTML, folders to share files, etc.). These vague memories may also be with server distributions (Ubuntu Server 5.10, for example).

By "communicate with droids" I meant the computer doing things with the phones, like sharing files or folders (from both). Maybe I should try installing ftp (server? I will search a tutorial for that, should exist) in my Debian, and have a small ftp client apk at hand to everyone here.

One important detail is: I want to use these things only using the local network. Or I will have to worry more about the security of my computer on the whole Internet. Using Internet services for these are acceptable, though, if is too hard to do it locally (which I guess it is not).

@ #3:

Airdroid... seems very nice, and michaelk also thinks this. I did not even know that controling a phone remotely for all they say in the main page you pointed was possible!

If installing something is necessary, most people I know would practically be much more fond of the idea if the app is FOSS.

The other software you point seems nice too - and its feature is very simplistic, remembers me of ftp, Samba and interaction with simple websites (upload or download files).

My experience with smartphones is very small. I still do not have one for daily use, and I just play and do a few things with friends' ones, sometimes.

@ #3: as you said, frankbell understood me a better. I am sorry if I was not clear with what I wanted. As I already said, it may be just my lack of "mobile mileage".

I did not install Apache yet, but I will do it today. The default Apache settings should be safe for "remote pirates", right? I know some HTML and a bit of PHP, should be fairly easy to play a bit around the (I know I would have to install PHP to use it), although have been many years since I did so.

^o^

dedec0 10-05-2018 01:46 AM

Small, easy and fast, but...

I just started to solve part of the problem. I installed apache2 (and one more package: apache2-doc). I could make a static page and access it from phone. Now I will search if there is an easy, quick and FOSS to make pc<=>phone file transfers, Debian (as client) is already ready for that.

JJJCR 10-05-2018 04:58 AM

check out this link, I think it might help what you are trying to accomplish: https://askubuntu.com/questions/6337...are-for-ubuntu

At first I thought you want something like RAT, :)

AwesomeMachine 10-05-2018 10:31 AM

Samba works for file sharing with Android. You can get a GSM Android phone on eBay for 40.00. Tracfone will give you data/phone/text service for 15.00/month, or even less. You just need an unlocked GSM phone with an external SIM card slot and Android 6 or later.

If you want to get into the guts of the phone, you'd use ADB.

hazel 10-05-2018 10:42 AM

Is apache actually necessary for informal communication over the home network. On any single machine, you can view an html file in a browser without needing a web server; you use the file:// protocol.

Now if you have an ssh server running on your machine, you should be able to log in from another machine and use the same trick to see the local files in your remote browser.

No, hold on! You'd have to use the browser on the same machine as the files. But it should be possible. Or am I missing something here?

scasey 10-05-2018 03:48 PM

Quote:

Originally Posted by hazel (Post 5911454)
Is apache actually necessary for informal communication over the home network. On any single machine, you can view an html file in a browser without needing a web server; you use the file:// protocol.

Now if you have an ssh server running on your machine, you should be able to log in from another machine and use the same trick to see the local files in your remote browser.

No, hold on! You'd have to use the browser on the same machine as the files. But it should be possible. Or am I missing something here?

You are correct. You don't need a web server to view a local html file in a browser. The SciTE editor even has a command that says "open this in the browser" when editing an html file.

But if I want to see a web page using a browser on some other machine, there needs to be a web server running on that machine to connect to. For example, here's the response on Firefox from the Windows desktop on my network trying to connect to this desktop, which doesn't have a web server running (or even installed:
Code:

Unable to connect

Firefox can’t establish a connection to the server at webclone.

    The site could be temporarily unavailable or too busy. Try again in a few moments.
    If you are unable to load any pages, check your computer’s network connection.
    If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

(I actually also get that locally, because http://webclone attempts to connect on port 80, and there's nothing there)

I connect to this desktop all the time via ssh using PuTTY...

dedec0 10-05-2018 04:51 PM

Quote:

Originally Posted by hazel (Post 5911454)
Is apache actually necessary for informal communication over the home network. On any single machine, you can view an html file in a browser without needing a web server; you use the file:// protocol.

Now if you have an ssh server running on your machine, you should be able to log in from another machine and use the same trick to see the local files in your remote browser.

No, hold on! You'd have to use the browser on the same machine as the files. But it should be possible. Or am I missing something here?

Indeed. It seems to be only for local files:

Wikipedia: File URI scheme

I even tried it from a phone that can access the computer site through Apache, with both IP and computer's hostname. Access denied - could Apache do this different? But serving FTP is what I am looking at now. The specific apps a few of you pointed seems to be more than what I will usually need and use - and they can be done by other services already in use.

scasey 10-05-2018 05:10 PM

Quote:

Originally Posted by dedec0 (Post 5911577)
But serving FTP is what I am looking at now. The specific apps a few of you pointed seems to be more than what I will usually need and use - and they can be done by other services already in use.

Thought you said you could ssh from the phone to the desktop, yes?
If you can ssh, you can sftp...no additional server required on the PC. Don't know what's available for the phone, tho.

dedec0 10-05-2018 05:41 PM

Quote:

Originally Posted by scasey (Post 5911579)
Thought you said you could ssh from the phone to the desktop, yes?
If you can ssh, you can sftp...no additional server required on the PC. Don't know what's available for the phone, tho.

I said I can ssh from the computer to itself. So (I guess) I can ssh from phones to the computer, as long as they have an user+password for that. If that if possible, of course scp would be possible... but typing scp queries would be hard on mobiles - I guess.

About sftp... I am trying that right now. Open tabs:

https://itsfoss.com/use-ftp-linux-android/

https://f-droid.org/en/packages/org.primftpd/

https://f-droid.org/en/packages/org....g.sendwithftp/

sftp x ftp is not important now. It is simple.

The final result I imagine is: leave a webpage to download a few apks, maybe having one or two links too; the computer will have a local only FTP (or sftp, if that is not possible) to upload and download files from a chosen computer directory (id est, I want an FTP root folder completely arbitrary); play with files of both.

dedec0 10-05-2018 05:43 PM

@ #8
 
@ #8 (I forgot to write this comment, I am sorry!)

Except by the possible samba share, the rest does not seem close to what I am imagining here - as you probably have seen in the other posts.

(:

AwesomeMachine 10-05-2018 08:45 PM

Samba is OS agnostic. If you haven't used it before, there's a little learning curve. But it does exactly what you want, which is to share files. You just set up the server on the PC, and scan the lan from a file manager on the Android phone. The phone should just find the samba share.


All times are GMT -5. The time now is 11:32 PM.