Hosting a website on a PinePhone, etc.
#11
(02-18-2021, 06:36 PM))TRS-80 Wrote:
(02-17-2021, 07:31 PM)Zebulon Walton Wrote: Is carrier-grade NAT being used only for IPV4 addresses, or are they assigning publicly-accessible IPV6 addresses?

That's a good question.  I rather doubt it, but it would be very interesting if they are.

This is kind of a tangent, but IPv6 was supposed to bring back the original internet concept of transparent end-to-end communication between nodes. NAT is a grotesque hack that was supposed to be a temporary band-aid to preserve the IPv4 address space when it became obvious that it was inadequate for the growing internet. NAT was never intended to be enshrined as S.O.P.  In fact as I recall, originally IPv6 was not going to support NAT at all because the vast address space made it unnecessary. The capability was ultimately included, though its use is discouraged. I have no idea what approach cell phone carriers are using in their IPv6 networks.

When TCP/IP was originally being developed there were some who wanted to use 48-bit addressing. If that had been done we probably would have never seen NAT, but the the larger address space was rejected due to the limitations of hardware at the time - it just took too much in the way of machine resources to process 48-bit addresses. (People sometimes complain about the Pinephone hardware being low-end, but 40 years ago the idea of a pocket-size computer with gigabytes of memory and storage equipped with a quad 64-bit processor, all for a couple of hundred dollars, was pure science fiction fantasy. Back then even mainframes didn't have that kind of power and capacity.)

https://security.stackexchange.com/quest...t-any-more
  Reply
#12
Yes and they put a man on the moon using only slide rules.  Smile  I agree with you, I think we only need to look back a few short decades to really appreciate just how far we have actually come.  I think some people lack this perspective nowadays, especially with the rampant consumerism mentality fostered by advertising.

I am mostly aware of the technical history / considerations (being fascinated by the topic for a long time now).  But I have also grown highly distrustful of tech oligarchs and governments, given what they have demonstrated these last years / decades.  So to me, IPv6, whilst perhaps technically "superior" in the end potentially turns into positive individual identification in the wrong hands, which is why I am not such a fan of it.

As you point out, things like OP want to do should be no problem with IPv6, from a technical standpoint.  Does that mean you can actually do it?  Which is why I said I have my doubts.  Because it's is a matter of Verizon policy and other nonsense like their "business model" and nothing to do with what is actually possible with the technology.  Just like tethering, and many, many other things.

After experiencing many such disappointments over the years, one could be forgiven for becoming leery of "technological progress" if in the end it is not used to benefit humanity.  Which unfortunately seems to happen quite often, the technology being used instead to implement some sort of Orwellian surveillance nightmare.

On that cheery note, enjoy your weekends!   Big Grin
Cheers,
TRS-80

What is Free Software and why is it so important for society?

Protocols, not Platforms

For the most Linux-y experience on your Linux phone, try SXMO!

I am (nominally) the Armbian Maintainer for PineBook Pro (although severely lacking in time these days).
  Reply
#13
I apologize for being away so long - things have been kind of hectic around here.

TRS-80 and Zebulon Walton, I am indebted to you both for your kind attention to my problem. Your thoughtful analysis is truly appreciated. More than ever, I'm so excited and honored to join the Linux community, and hope that someday, I will be able to advise others as you have me.

With all of the issues you raised, I'm going to ask your indulgence a bit further. My prior assumptions might be totally wrong, and as you said, TRS-80, a little backtracking is in order. So please bear with me, I'm going to start over again and try to give you a sense of my thought process from the beginning.

1. My only connection to the Internet is an unlimited voice and data plan with Verizon - basically, a family member gifted me 1 line on their plan (too good to pass up! :-D ).

2. I've purchased a domain name for a public-facing, not-for-profit website. Since I expect very little traffic for some time, and don't want to advertise for Google, Wordpress, etc., I really like the idea of maintaining complete control by self-hosting, at least to start.

3. Originally, I thought it would be natural to use 1 of my computers (an old Chromebook or a very old Titanium PowerBook, whichever is better suited for Linux) for hosting, using the WiFi hotspot of the phone. However, the WiFi connection drops off with inactivity. Unless there is a way to avoid this and force a persistent connection (is there?), that would eliminate this option.

4. Since the Verizon connection to the phone itself has been excellent (even in severe weather), and since I'm home-bound, making very few voice calls, and since I was unable to find any laptop or tablet (let alone the 2 that I have already) that will take a Sim card and have a cellular modem to make the few calls that I do need to make (to doctor's offices, possibly 911, etc.), my next best option was to use the phone itself for hosting. Along with the line I have, I was gifted an iPhone, but while searching for Linux phones, discovered the PinePhone, which I'm hoping to replace it with.

5. Now, with all that being said, I think you both are saying that regardless of device, I won't be able to self-host, unless Verizon provides me with an IPV6 address - is that correct? By the way, is there a way to know if I have IPV6 or IPV4, without asking Verizon itself (I couldn't find anything in "Settings")? Also, I'm assuming that even if I were able to get the WiFi to be constantly connected, that other devices connected via WiFi would also be IPV4 and unable to be reached from outside, even if I were to buy a router - is that correct? Finally, Wibble mentioned something about using a tunnel vs. not - what effect does that have on this?

6. Finally, if all of the answers to these questions are negative, do either of you have any other suggestions or recommendations? As for me, even if I'm not able to self-host, I'm still hoping to replace this iPhone with the PinePhone - just not sure when it will be available and a little nervous about it working reliably, since it'll be my only connection to the outside world.

Thanks again so much to both of you,
Cheers
  Reply
#14
The command "ip a" will list your network adapters and their associated IPv4 and IPv6 addresses. That may not be very useful though since even if you're not being assigned an IPv6 address, IPv6 will auto-configure one that is only accessible locally. Also it's possible that even if you are being assigned an IPv6 address from Verizon it may be NATed or firewalled upstream making it difficult or impossible to run a public server.

What you may want to look at is setting up a virtual server at a VPS provider. Some out there are pretty cheap, for example ionos.com starts at $2/month for a basic setup:

https://www.ionos.com/servers/vps

Although limited their $2/month level would be OK for running a small site using nginx or lighthttpd. If you don't want to maintain your own server and deal with all the security issues etc. you could look at shared web hosting plans, which can be had at places like the following for as little as $1/month:

https://www.hostinger.com/web-hosting

I really think if you want a publicly-accessible site you'd be better off with one of the above inexpensive options rather than hosting it directly on the Pinephone using a cellular connection. I see running a web server on the phone as a neat "look what it can do" experiment, but I don't think it's really suitable for hosting a live web site.
  Reply
#15
(02-12-2021, 06:09 PM)a-l Wrote: Hi everybody,

I'm new here, and have a few questions:

1. My hope is to have the PinePhone be my ONLY device, just making a few voice calls, and hosting a website on it using NGINX or Apache 
    at the SAME time using the cellular modem, NOT WiFi. Before you say this is crazy - I'm at home (in the U.S.) almost all the time, but have a great
    connection using a Verizon unlimited voice/data plan. I'd just like to try it out - it would be cool if it works, don't you think? Does anyone know for
    sure if the PinePhone (preferably the Convergence package with more memory, etc.) will be able to handle this?

2. Is the PinePhone actually available? I've emailed the Sales Dept., but got no response. On the PineStore, it shows the EU edition only - being in the U.S.,
    would it be wrong for me to get that? And does it matter whether it is the Mobian, KDE, or Manjaro version?

3. Since the PinePhone is not an "officially supported" Verizon phone, would I be able to just take out the Sim card of my current phone (an iPhone)
    and put it in the PinePhone and have it work?


Sorry for all the questions, and thank you in advance to anyone who can help.
in regards to the first question;

Quick google got me this: https://m2mdeveloper.verizon.com/docs/ts...evice.html

you gotta jump some hoops with verizon but it seems to be possible to get an APN with open ports / a public IP or at least some forwarding.

Nginx runs well, I'm hosting a static website on my pinephone *on 4G*
  Reply
#16
i think all the key info is already given so i just mostly give summary of it.

idea that pinephone operates as a server and handles ordinary calls, yes it's possible. is it practical, i would say no. in my view if server has static content it's better served elsewhere, however, other kind of servers might be a different story.

extensive linux experience is practically required, and still encountering weird problems.

lack of public ip is one and maybe biggest hurdle. dynamic and static ip numbers are both public but operators usually use nat ip numbers (like 10.0.0.0/10.255.255.255 , 100.64.0.0-100.127.255.255), which means connections from outside is impossible. tunnels are possible but also starts to get complicated. ipv6 may fix these but both client and server needs ipv6 and still operator may have restrictive firewall.

is pinephone good as server, actually it might be excellent as a server, depending what user runs there of course. in the end separate server might be better practical idea, like it was suggested that single board computer could do it. how to put publically accessible ip number in it is the issue.

i am in finland, and i have three sim cards from different operators. all of them have public ip number possibility but two of them have possibility make calls, however volte works. i could do it in my pinephone what original poster describes but three sim cards, other options sound better idea.

verizon uses lockin business model, which creates its own hurdles. locking devices out and also restricting wifi hotspots. in the u.s. operators can ban wifi hotspot if wanted. this can be circumvented but hotspot usually creates yet another nat problem.

weirdly, in finland, i heard, banning third party devices out in a cellphone network is illegal, unless its abusive or criminal. also some kind net neutraliy applies as well, hotspot cannot be banned. (eu net neutrality is not same as u.s.)

coincidentally, i have one well known cloud providers account, which requires credit or debit card. if content is static and low on usage, it's practically free.
  Reply
#17
(02-23-2021, 06:04 PM)Trbl Wrote: you gotta jump some hoops with verizon but it seems to be possible to get an APN with open ports / a public IP or at least some forwarding.

Nginx runs well, I'm hosting a static website on my pinephone *on 4G*


This is really interesting (and honestly, better than what I was expecting)!



So, now that it appears technically possible, the question becomes: do you want to / is that a good idea?  I must say, that Trbl's website loaded right away for me.  For a small static site, that's not getting much traffic yet, that might actually be perfectly fine.




In fact, playing around with self-hosting your own services is a really good way to learn GNU/Linux.  And here it appears you can do so with no further expenditure.




@Trbl,


Neat site by the way!  A little creepy.  But neat!  Big Grin




@a-l,




I don't know where you purchased your domain name, or how much you paid, but for only a little more money you could have probably gotten an inexpensive shared hosting plan as well, which would probably even include stuff like email addresses, which can also be very handy to have.

P.S. Apologies for all the extra newlines, some times the forum software seems to do this (even though I removed them all multiple times), and I have not yet figured out what is causing it.
Cheers,
TRS-80

What is Free Software and why is it so important for society?

Protocols, not Platforms

For the most Linux-y experience on your Linux phone, try SXMO!

I am (nominally) the Armbian Maintainer for PineBook Pro (although severely lacking in time these days).
  Reply
#18
(02-23-2021, 08:15 PM)TRS-80 Wrote:
(02-23-2021, 06:04 PM)Trbl Wrote: you gotta jump some hoops with verizon but it seems to be possible to get an APN with open ports / a public IP or at least some forwarding.

Nginx runs well, I'm hosting a static website on my pinephone *on 4G*
This is really interesting (and honestly, better than what I was expecting)!

So, now that it appears technically possible, the question becomes: do you want to / is that a good idea?  I must say, that Trbl's website loaded right away for me.  For a small static site, that's not getting much traffic yet, that might actually be perfectly fine.
In fact, playing around with self-hosting your own services is a really good way to learn GNU/Linux.  And here it appears you can do so with no further expenditure.

@Trbl,
Neat site by the way!  A little creepy.  But neat!  :D
My current setup looks like this:
  • 4G contract with unlimited data & public IP apn (30$)
  • Domain (her.st) (about 1$ a month)
  • Home Server (8W/h not really visible on the powerbill)
  • VPS (5$ /m) ((free, im my own hosting provider, specs are equal to what I sell for 5$/m))
VPS is running mailinabox (email, dns, nextcloud, webmail, static websites)
all personal projects I want to share with others / expose to the public

My Home Server deals with Storage, backups, some scripts like a [size=small]youtube-dl sync script that trancodes to audio and pushes the files to my phone automatically every night, by monitoring a youtube playlists for changes, local testing before pushing it on the VPS

All I needed to do to make the dynamic IP situation work was setup a DNS record in the mailinabox admin panel, and a script on the pinephone that posts its public IP through the simple REST API mailinabox provides with a networkmanager hook, whenever the connection goes up, it updates the DNS record to point to the new IP.

With a setup like that you can do ANYTHING and its like 35$ a month. The CPU in the pp is really slow, so I try to offload anything I can to either the homeserver or the VPS, i think this is the best appraoch for slow hardware, distributed computing - but since all of those distributed services can also run locally, you can have failovers for alot of stuff running (slowly) directly on the pinephone.

Sorry for the wall of text, i just love my pinephone xD
  Reply
#19
(02-24-2021, 12:08 AM)Trbl Wrote:
(02-23-2021, 08:15 PM)TRS-80 Wrote:
(02-23-2021, 06:04 PM)Trbl Wrote: you gotta jump some hoops with verizon but it seems to be possible to get an APN with open ports / a public IP or at least some forwarding.

Nginx runs well, I'm hosting a static website on my pinephone *on 4G*
This is really interesting (and honestly, better than what I was expecting)!

So, now that it appears technically possible, the question becomes: do you want to / is that a good idea?  I must say, that Trbl's website loaded right away for me.  For a small static site, that's not getting much traffic yet, that might actually be perfectly fine.
In fact, playing around with self-hosting your own services is a really good way to learn GNU/Linux.  And here it appears you can do so with no further expenditure.

@Trbl,
Neat site by the way!  A little creepy.  But neat!  Big Grin
My current setup looks like this:
  • 4G contract with unlimited data & public IP apn (30$)
  • Domain (her.st) (about 1$ a month)
  • Home Server (8W/h not really visible on the powerbill)
  • VPS (5$ /m) ((free, im my own hosting provider, specs are equal to what I sell for 5$/m))
VPS is running mailinabox (email, dns, nextcloud, webmail, static websites)
all personal projects I want to share with others / expose to the public

My Home Server deals with Storage, backups, some scripts like a youtube-dl sync script that trancodes to audio and pushes the files to my phone automatically every night, by monitoring a youtube playlists for changes, local testing before pushing it on the VPS

All I needed to do to make the dynamic IP situation work was setup a DNS record in the mailinabox admin panel, and a script on the pinephone that posts its public IP through the simple REST API mailinabox provides  with a networkmanager hook, whenever the connection goes up, it updates the DNS record to point to the new IP.

With a setup like that you can do ANYTHING and its like 35$ a month. The CPU in the pp is really slow, so I try to offload anything I can to either the homeserver or the VPS, i think this is the best appraoch for slow hardware, distributed computing - but since all of those distributed services can also run locally, you can have failovers for alot of stuff running (slowly) directly on the pinephone.

Sorry for the wall of text, i just love my pinephone xD


Thank you Trbl,

It's great to finally hear some more positive news! :-D  I do have questions, but let me say at the outset, instead of bothering you, if you can recommend any tutorials, etc., I will try very hard to learn on my own. Also, I don't know if you saw my 3rd post, but here are some specific questions:

1. Regarding the page you referenced: https://m2mdeveloper.verizon.com/docs/ts...evice.html  , are you saying that by me writing some code to create a "public IP Apn" that it will basically be giving the pp an IPv6 address?

2. Since you seem to be offloading as much as you can due to the pp's slow CPU, and my original intention was to host on a laptop connected to the pp via hotspot, I'm assuming that the laptop will also have an IPv6 address (same one as the pp?). But, how do you keep the WiFi from dropping off? Also, I don't know if I'll need this, but are you allowed to have multiple devices connected via the hotspot, or would you need to use a router?

3. About VPS and Home Server - would I need both of these, and if so, can I do them on my own, as you have?

Again, sorry if my questions are too basic. I'm anxious to learn though, if I can just get my hands on a pp. Big Grin

Cheers
  Reply
#20
(02-27-2021, 03:55 AM)a-l Wrote:
(02-24-2021, 12:08 AM)Trbl Wrote:
(02-23-2021, 08:15 PM)TRS-80 Wrote:
(02-23-2021, 06:04 PM)Trbl Wrote: you gotta jump some hoops with verizon but it seems to be possible to get an APN with open ports / a public IP or at least some forwarding.

Nginx runs well, I'm hosting a static website on my pinephone *on 4G*
This is really interesting (and honestly, better than what I was expecting)!

So, now that it appears technically possible, the question becomes: do you want to / is that a good idea?  I must say, that Trbl's website loaded right away for me.  For a small static site, that's not getting much traffic yet, that might actually be perfectly fine.
In fact, playing around with self-hosting your own services is a really good way to learn GNU/Linux.  And here it appears you can do so with no further expenditure.

@Trbl,
Neat site by the way!  A little creepy.  But neat!  Big Grin
My current setup looks like this:
  • 4G contract with unlimited data & public IP apn (30$)
  • Domain (her.st) (about 1$ a month)
  • Home Server (8W/h not really visible on the powerbill)
  • VPS (5$ /m) ((free, im my own hosting provider, specs are equal to what I sell for 5$/m))
VPS is running mailinabox (email, dns, nextcloud, webmail, static websites)
all personal projects I want to share with others / expose to the public

My Home Server deals with Storage, backups, some scripts like a youtube-dl sync script that trancodes to audio and pushes the files to my phone automatically every night, by monitoring a youtube playlists for changes, local testing before pushing it on the VPS

All I needed to do to make the dynamic IP situation work was setup a DNS record in the mailinabox admin panel, and a script on the pinephone that posts its public IP through the simple REST API mailinabox provides  with a networkmanager hook, whenever the connection goes up, it updates the DNS record to point to the new IP.

With a setup like that you can do ANYTHING and its like 35$ a month. The CPU in the pp is really slow, so I try to offload anything I can to either the homeserver or the VPS, i think this is the best appraoch for slow hardware, distributed computing - but since all of those distributed services can also run locally, you can have failovers for alot of stuff running (slowly) directly on the pinephone.

Sorry for the wall of text, i just love my pinephone xD


Thank you Trbl,

It's great to finally hear some more positive news! :-D  I do have questions, but let me say at the outset, instead of bothering you, if you can recommend any tutorials, etc., I will try very hard to learn on my own. Also, I don't know if you saw my 3rd post, but here are some specific questions:

1. Regarding the page you referenced: https://m2mdeveloper.verizon.com/docs/ts...evice.html  , are you saying that by me writing some code to create a "public IP Apn" that it will basically be giving the pp an IPv6 address?

2. Since you seem to be offloading as much as you can due to the pp's slow CPU, and my original intention was to host on a laptop connected to the pp via hotspot, I'm assuming that the laptop will also have an IPv6 address (same one as the pp?). But, how do you keep the WiFi from dropping off? Also, I don't know if I'll need this, but are you allowed to have multiple devices connected via the hotspot, or would you need to use a router?

3. About VPS and Home Server - would I need both of these, and if so, can I do them on my own, as you have?

Again, sorry if my questions are too basic. I'm anxious to learn though, if I can just get my hands on a pp. Big Grin

Cheers

Sorry for the wait, I got a puppy and she's keeping me busy 24/7..

So here's how it works for me:

On the PinePhone I have 4G, with an APN that gives me a publicly reachable IPv4 address (how to do that on verizon seems to be described in the URL, maybe you can call them instead and ask for a public ipv4 apn? US of A is a bit backwards when it comes to internet service)
My homeserver is simply connected to my home internet, with a dynamic IP
My VPS runs the DNS server, for the her.st domain. 

i can assign each machine a url (hostname), like pp.her.st and home.her.st for the pinephone and homeserver respectively.

PinePhone and HomeServer both have a script running that runs when the internet connection has been established (homeserver waits for ethernet, pinephone waits for 4g) and then updates the url with its public ip.

Now pp.her.st points to the IPv4 it got from 4G and home.her.st points to the IPv4 the homeserver got from ethernet (home internet connection)

so if I want to talk to the phone, i just connect to pp.her.st, and if i want to talk to the homeserver, i connect to home.her.st. I don't have to worry about my IP's changing everytime I connect to the internet, everything is always available with the hostnames


Quote:But, how do you keep the WiFi from dropping off? 

I don't. I don't have to. It doesn't matter if its wifi or 4g. The VPS keeps track of the hostnames and if the connection changes, and therefore the IP, the script just updates the IP.


Quote:I don't know if I'll need this, but are you allowed to have multiple devices connected via the hotspot, or would you need to use a router?

I don't do wifi hotspots myself, but you can connect more than one client to a hotspot.


Quote:3. About VPS and Home Server - would I need both of these, and if so, can I do them on my own, as you have?

If you want hostnames & email, you need a VPS with a static IPv4 and a domain. You can't host that at home without a business internet contract w/ static IP. - VPS is much cheaper than that, and once you have a VPS, you can simply assign a hostname to the homeserver and have both, or just stick with the vps.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  eSIM on PinePhone just_a_q 8 4,645 11-05-2024, 11:10 AM
Last Post: zetabeta
  Want to buy second hand PinePhone 3G version rudi.timmermans 0 167 11-01-2024, 09:58 AM
Last Post: rudi.timmermans
  Can use PlayStation on Pinephone? willharper 6 5,654 10-30-2024, 08:07 AM
Last Post: biketool
  Ordered PinePhone till today have no info or confirmation about order hennadiyt 1 348 10-05-2024, 02:20 PM
Last Post: KC9UDX
  US Mobile, via T-Mobile, won't support Pinephone Pro - SOLVED, SIMPLY jovval 11 5,754 07-28-2024, 03:42 PM
Last Post: dchang0
  How can I record video on a Pinephone? kk22 18 7,114 07-22-2024, 05:18 PM
Last Post: baptx
  Pinephone not booting, always vibrating alexander12 8 6,863 07-19-2024, 07:50 PM
Last Post: Blackheart
  PinePhone Pro P. Siera 2 818 07-17-2024, 12:41 AM
Last Post: P. Siera
  PinePhone Boots but only Shows Black Screen with Backlight danyeaw 1 677 06-30-2024, 10:18 AM
Last Post: danyeaw
  Pinephone won't boot. spha 13 5,873 05-15-2024, 10:31 PM
Last Post: Richy_T

Forum Jump:


Users browsing this thread: 1 Guest(s)