I start my USB 3G Modem by:# wvdialAnd then I must do, in order to acquire internet access:# route add default ppp0Note that ppp0 is, in this case, the newly created virtual network interface.I would like to automate this:#!/bin/bash wvdialroute add default ppp0But sometimes there is some previous ppp connection established (i.e: VPN), so the correct adapter must have another number (it is created as ppp1, ppp2... etc), and I need to parse ifconfig output or any other method.Isn't there a more practical way to automate the routing part of the PPP connection?EDIT-1: This is my /etc/wvdial.conf :[Dialer Defaults]Init1 = ATZInit2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0Init3 = AT+CGDCONT=1,IP,ac.vodafone.es;Modem = /dev/ttyUSB0Phone = *99***1#Username = vodafonePassword = vodafoneStupid Mode = 1# Carrier Check = no#Dial Command = ATDT#Baud = 9600Baud = 460800ISDN = 0Modem Type = Analog ModemThe carrier is Vodafone.EDIT-2: My distro is Kali Linux v1.0.5EDIT-3: Added to /etc/wvdial.conf :New PPPD = yesStill no results :-( .
Automating PPP connection: adding the insertion in routing table of the new interface
networking;ppp