I start my USB 3G Modem by:
And then I must do, in order to acquire internet access:
# route add default ppp0
ppp0 is, in this case, the newly created virtual network interface.
I would like to automate this:
#!/bin/bash wvdial route add default ppp0
But sometimes there is some previous ppp connection established (i.e: VPN), so the correct adapter must have another number (it is created as
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
[Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Init3 = AT+CGDCONT=1,"IP","ac.vodafone.es"; Modem = /dev/ttyUSB0 Phone = *99***1# Username = vodafone Password = vodafone Stupid Mode = 1 # Carrier Check = no #Dial Command = ATDT #Baud = 9600 Baud = 460800 ISDN = 0 Modem Type = Analog Modem
The carrier is Vodafone.
EDIT-2: My distro is Kali Linux v1.0.5
EDIT-3: Added to
New PPPD = yes
Still no results :-( .