I am trying to get internet connection in my raspberry pi 3 (Raspbian) with a GSM (SIM900a) module, connecting it to RXD/TXD Serial ports (/dev/ttyS0), I already got an ip address and DNSs, but I can't even ping any host, so I think it must be a routing problem, but I'm too newbie at low-level networking things to get the proper configuration by myself. I already have tried a lot of possible configs and didn't get it to work.I think that what I am missing may be an iptables rule... something with POSTROUTING MASQUERADE? I don't know...ppp output in /var/log/messages:Oct 18 22:09:35 NULL chat[1277]: abort on (BUSY)Oct 18 22:09:35 NULL chat[1277]: abort on (NO CARRIER)Oct 18 22:09:35 NULL chat[1277]: abort on (VOICE)Oct 18 22:09:35 NULL chat[1277]: abort on (NO DIALTONE)Oct 18 22:09:35 NULL chat[1277]: abort on (NO DIAL TONE)Oct 18 22:09:35 NULL chat[1277]: abort on (NO ANSWER)Oct 18 22:09:35 NULL chat[1277]: abort on (DELAYED)Oct 18 22:09:35 NULL chat[1277]: report (CONNECT)Oct 18 22:09:35 NULL chat[1277]: timeout set to 6 secondsOct 18 22:09:35 NULL chat[1277]: send (ATQ0^M)Oct 18 22:09:35 NULL chat[1277]: expect (OK)Oct 18 22:09:35 NULL chat[1277]: ATQ0^M^MOct 18 22:09:35 NULL chat[1277]: OKOct 18 22:09:35 NULL chat[1277]:  -- got itOct 18 22:09:35 NULL chat[1277]: send (ATZ^M)Oct 18 22:09:35 NULL chat[1277]: timeout set to 3 secondsOct 18 22:09:35 NULL chat[1277]: expect (OK)Oct 18 22:09:35 NULL chat[1277]: ^MOct 18 22:09:35 NULL chat[1277]: ATZ^M^MOct 18 22:09:35 NULL chat[1277]: OKOct 18 22:09:35 NULL chat[1277]:  -- got itOct 18 22:09:35 NULL chat[1277]: send (AT+CPIN=5503^M)Oct 18 22:09:35 NULL chat[1277]: expect (OKd)Oct 18 22:09:35 NULL chat[1277]: ^MOct 18 22:09:35 NULL chat[1277]: AT+CPIN=5503^M^MOct 18 22:09:35 NULL chat[1277]: ERROR^MOct 18 22:09:38 NULL chat[1277]: alarmOct 18 22:09:38 NULL chat[1277]: send (AT^M)Oct 18 22:09:38 NULL chat[1277]: expect (OK)Oct 18 22:09:38 NULL chat[1277]: AT^M^MOct 18 22:09:38 NULL chat[1277]: OKOct 18 22:09:38 NULL chat[1277]:  -- got itOct 18 22:09:38 NULL chat[1277]: send (ATI^M)Oct 18 22:09:38 NULL chat[1277]: expect (OK)Oct 18 22:09:38 NULL chat[1277]: ^MOct 18 22:09:38 NULL chat[1277]: ATI^M^MOct 18 22:09:38 NULL chat[1277]: SIM900 R11.0^MOct 18 22:09:38 NULL chat[1277]: ^MOct 18 22:09:38 NULL chat[1277]: OKOct 18 22:09:38 NULL chat[1277]:  -- got itOct 18 22:09:38 NULL chat[1277]: send (ATZ^M)Oct 18 22:09:38 NULL chat[1277]: expect (OK)Oct 18 22:09:38 NULL chat[1277]: ^MOct 18 22:09:38 NULL chat[1277]: ATZ^M^MOct 18 22:09:38 NULL chat[1277]: OKOct 18 22:09:38 NULL chat[1277]:  -- got itOct 18 22:09:38 NULL chat[1277]: send (ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0^M)Oct 18 22:09:39 NULL chat[1277]: expect (OK)Oct 18 22:09:39 NULL chat[1277]: ^MOct 18 22:09:39 NULL chat[1277]: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0^M^MOct 18 22:09:39 NULL chat[1277]: OKOct 18 22:09:39 NULL chat[1277]:  -- got itOct 18 22:09:39 NULL chat[1277]: send (AT^M)Oct 18 22:09:39 NULL chat[1277]: expect (OK)Oct 18 22:09:39 NULL chat[1277]: ^MOct 18 22:09:39 NULL chat[1277]: AT^M^MOct 18 22:09:39 NULL chat[1277]: OKOct 18 22:09:39 NULL chat[1277]:  -- got itOct 18 22:09:39 NULL chat[1277]: send (AT+CGDCONT=1,IP,lowi.private.omv.es^M)Oct 18 22:09:39 NULL chat[1277]: expect (OK)Oct 18 22:09:39 NULL chat[1277]: ^MOct 18 22:09:39 NULL chat[1277]: AT+CGDCONT=1,IP,lowi.private.omv.es^M^MOct 18 22:09:39 NULL chat[1277]: OKOct 18 22:09:39 NULL chat[1277]:  -- got itOct 18 22:09:39 NULL chat[1277]: send (ATDT*99***1#^M)Oct 18 22:09:39 NULL chat[1277]: timeout set to 30 secondsOct 18 22:09:39 NULL chat[1277]: expect (CONNECT)Oct 18 22:09:39 NULL chat[1277]: ^MOct 18 22:09:39 NULL chat[1277]: ATDT*99***1#^M^MOct 18 22:09:39 NULL chat[1277]: CONNECTOct 18 22:09:39 NULL chat[1277]:  -- got itOct 18 22:09:39 NULL chat[1277]: send (^M)Oct 18 22:09:39 NULL pppd[1270]: Script /usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile-modem.chat finished (pid 1276), status = 0x0Oct 18 22:09:39 NULL pppd[1270]: Serial connection established.Oct 18 22:09:39 NULL pppd[1270]: using channel 1Oct 18 22:09:39 NULL pppd[1270]: Using interface ppp0Oct 18 22:09:39 NULL pppd[1270]: Connect: ppp0 <--> /dev/ttyS0Oct 18 22:09:40 NULL pppd[1270]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic0x16c75854> <pcomp> <accomp>]Oct 18 22:09:41 NULL pppd[1270]: rcvd [LCP ConfReq id=0x1 <asyncmap 0xa0000> <auth pap>]Oct 18 22:09:41 NULL pppd[1270]: sent [LCP ConfAck id=0x1 <asyncmap 0xa0000> <auth pap>]Oct 18 22:09:41 NULL pppd[1270]: rcvd [LCP ConfRej id=0x1 <magic 0x16c75854> <pcomp> <accomp>]Oct 18 22:09:41 NULL pppd[1270]: sent [LCP ConfReq id=0x2 <asyncmap 0x0>]Oct 18 22:09:41 NULL pppd[1270]: rcvd [LCP ConfAck id=0x2 <asyncmap 0x0>]Oct 18 22:09:41 NULL pppd[1270]: sent [LCP EchoReq id=0x0 magic=0x0]Oct 18 22:09:41 NULL pppd[1270]: sent [PAP AuthReq id=0x1 user=NULL password=<hidden>]Oct 18 22:09:41 NULL pppd[1270]: rcvd [LCP EchoRep id=0x0 magic=0x0]Oct 18 22:09:41 NULL pppd[1270]: rcvd [PAP AuthAck id=0x1 Login OK]Oct 18 22:09:41 NULL pppd[1270]: Remote message: Login OKOct 18 22:09:41 NULL pppd[1270]: PAP authentication succeededOct 18 22:09:41 NULL pppd[1270]: sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]Oct 18 22:09:41 NULL pppd[1270]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]Oct 18 22:09:41 NULL pppd[1270]: rcvd [LCP ProtRej id=0x2 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]Oct 18 22:09:41 NULL pppd[1270]: Protocol-Reject for 'Compression Control Protocol' (0x80fd) receivedOct 18 22:09:44 NULL pppd[1270]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]Oct 18 22:09:44 NULL pppd[1270]: rcvd [IPCP ConfReq id=0x1 <addr 192.200.1.21>]Oct 18 22:09:44 NULL pppd[1270]: sent [IPCP ConfAck id=0x1 <addr 192.200.1.21>]Oct 18 22:09:44 NULL pppd[1270]: rcvd [IPCP ConfNak id=0x1 <addr 10.242.68.43> <ms-dns1 195.219.66.42> <ms-dns2 87.119.194.34>]Oct 18 22:09:44 NULL pppd[1270]: sent [IPCP ConfReq id=0x2 <addr 10.242.68.43> <ms-dns1 195.219.66.42> <ms-dns2 87.119.194.34>]Oct 18 22:09:44 NULL pppd[1270]: rcvd [IPCP ConfAck id=0x2 <addr 10.242.68.43> <ms-dns1 195.219.66.42> <ms-dns2 87.119.194.34>]Oct 18 22:09:44 NULL pppd[1270]: not replacing default route to wlan0 [192.168.1.1]Oct 18 22:09:44 NULL pppd[1270]: local  IP address 10.242.68.43Oct 18 22:09:44 NULL pppd[1270]: remote IP address 192.200.1.21Oct 18 22:09:44 NULL pppd[1270]: primary   DNS address 195.219.66.42Oct 18 22:09:44 NULL pppd[1270]: secondary DNS address 87.119.194.34Oct 18 22:09:44 NULL pppd[1270]: Script /etc/ppp/ip-up started (pid 1286)Oct 18 22:09:44 NULL pppd[1270]: Script /etc/ppp/ip-up finished (pid 1286), status = 0x0ifconfig output:pi@NULL:~ $ ifconfigeth0      Link encap:Ethernet  HWaddr b8:27:eb:34:7a:5e          inet6 addr: fe80::e8a7:c560:2f66:73a2/64 Scope:Link          UP BROADCAST MULTICAST  MTU:1500  Metric:1          RX packets:0 errors:0 dropped:0 overruns:0 frame:0          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)lo        Link encap:Local Loopback          inet addr:127.0.0.1  Mask:255.0.0.0          inet6 addr: ::1/128 Scope:Host          UP LOOPBACK RUNNING  MTU:65536  Metric:1          RX packets:200 errors:0 dropped:0 overruns:0 frame:0          TX packets:200 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1          RX bytes:16656 (16.2 KiB)  TX bytes:16656 (16.2 KiB)ppp0      Link encap:Point-to-Point Protocol          inet addr:10.242.68.43  P-t-P:192.200.1.21  Mask:255.255.255.255          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1          RX packets:3 errors:0 dropped:0 overruns:0 frame:0          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:3          RX bytes:54 (54.0 B)  TX bytes:91 (91.0 B)wlan0     Link encap:Ethernet  HWaddr b8:27:eb:61:2f:0b          inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0          inet6 addr: fe80::509e:723a:2fb:453/64 Scope:Link          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:7937 errors:0 dropped:759 overruns:0 frame:0          TX packets:1040 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000          RX bytes:1477582 (1.4 MiB)  TX bytes:199477 (194.8 KiB)PD: I've set my hostname to NULL, which may be confused at some points of the log, I'm sorry
Internet connection over GSM module + PPP
internet;route;ppp;interface;gsm