Skip to content

Instantly share code, notes, and snippets.

@matthijskooijman
Created February 14, 2017 15:27
Show Gist options
  • Save matthijskooijman/aa0b98d4cb253404865e1dfaf94b6b34 to your computer and use it in GitHub Desktop.
Save matthijskooijman/aa0b98d4cb253404865e1dfaf94b6b34 to your computer and use it in GitHub Desktop.
#Based on https://wiki.debian.org/Modem/3G#Installation_with_PPP_and_.2Fetc.2Fnetwork.2Finterfaces
connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T internet"
/dev/ttyUSB0
noipdefault
defaultroute
noauth
usepeerdns
# Keep the link alive
lcp-echo-interval 30
lcp-echo-failure 4
lcp-echo-adaptive
# Infinite retries
maxfail 0
# Time between retries
holdoff 20
# Keep running and automatically reconnect
persist
apt-get install ppp usb-modeswitch
Create /etc/ppp/peers/gprs and /etc/ppp/ip-up.d/ntpdate (a+x)
Modify /etc/network/interfaces:
auto gprs
iface gprs inet ppp
provider gprs
#!/bin/sh
# Execute the ntpdate hook again. ifupdown will have ran it already, but
# before the ppp connection is complete, making ntpdate fail.
exec /etc/network/if-up.d/ntpdate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment