Re: Un pò OT :Raspberry + Raspbian + fastweb
On 02/08/2017 09:14, Giancarlo Martini wrote:
> E' la procedura giusta o salto qualche punto?
Ti allego una procedura che ho usato tempo fa con successo..
Non si trattava di fastweb, ma penso cambi poco.
Fai le sostituzioni che sono richieste
ispapn => l'apn di fastweb
ispname => fastweb
| Linux User #554252 |
First we need to create so called chat script that will communicate directly to your modem hardware and configure things like
access point name (APN), timeouts and calling number using AT commands. I will create file named "ispname" inside
/etc/chatscripts/ directory to hold my chat script (replace "ispname" with your ISP name).
ABORT 'NO ANSWER'
ABORT 'NO CARRIER'
You should replace "ispapn" with your ISP access point name (APN.)
My ISP is using PAP authentication so I must add user name and password provided by my ISP at the end of my /etc/ppp/papsecrets
sudo nano /etc/ppp/pap-secrets
If your Internet service provider is using CHAP authentication do the same but use /etc/ppp/chap-secrets file. Also we must
decide on remote name identification string that will be used in the next steps to instruct pppd to use right pap or chap
credentials. I will use string "ispname" here. So here's what I have placed at the end of my /etc/ppp/pap-secrets file (place your
user name, password and string of your choice here instead of my "ispusername", "isppassword" and "ispname"):
"ispusername" "ispname" "isppassword"
If your ISP isn't using authentication and you don't need to provide name and password to connect to Internet you can skip this
As a third step we must create so called peers file that will be used by pppd to dial chat script created in the first step using
credentials stored in the second step. I will call my peers file "ispname" and place it into /etc/ppp/peers directory:
sudo nano /etc/ppp/peers/ispname
connect "/usr/sbin/chat -v -f /etc/chatscripts/ispname"
# Redial and interval
# No compression
# PAP authentication
# LCP echo messages settings
Uso di DNS alternativi al provider
due to usepeerdns option my example provided here is requesting DNS information from my ISP. To use your own DNS info, for
example Google public DNS or OpenDNS, you will create file inside /etc/ppp/resolv directory. For example to use Google public
DNS servers I would create /etc/ppp/resolv/google file and place following code inside:
Then you would need to remove "usepeerdns" line from your peers file and add something like:
where google is the name of your file inside /etc/ppp/resolv directory ("google" in my case). I recommend configuring manual
DNS settings later when you are sure that everything works with "usepeerdns".
Avvio della connessione
This is basic configuration to get you online.
To dial your connection you would use sudo pon ispname
and to disconnect you would use sudo poff ispname
(where "ispname" is you peers file name.)
To be able to dial without sudo you need to add your self to "dialout" group: sudo adduser $USER dialout
Further you might want to create interface for your pppd connection so you could control your GSM mobile broadband connection
using "ifup" and "ifdown" commands and/or dial automatically when your PC boot.
iface ppp0 inet ppp
pre-up sleep 10