Linux - HOWTO (With Stats)

Status
Not open for further replies.
Hey sky,

Sure no problem on the info ;) As for the telkom thing....what ever is in the defaults can be replaced in a section below...so:

[Defaults]
Number=1234

[Telkom]
Number=5678

wvdial telkom <-- will dial 5678 :) So just add a section for telkom and away you go :) I am sure in my example wvdial there is one for my notebook modem

Laterz !

First I want to say a big thank you to Tazz for all his help because I'm now typing this from Linux

Actually you can log in as root. You have to create a root password as per my previous post then you have to enable administration log in under system-administration-login window-security tab-allow local system administator log in. Then you can log in as root I got this tip from the website in my last post. I only checked that website after submitting that post:o

My connection is working without using the 2g / 3g setting. It came up with a string eror in the terminal.

Thanks again Tazz One question out of interest: will i only need the default dialer settings if using a normal telkom dial-up connection?
 
hmm... you learn a new thing every day...

First I want to say a big thank you to Tazz for all his help because I'm now typing this from Linux:D

Actually you can log in as root. You have to create a root password as per my previous post then you have to enable administration log in under system-administration-login window-security tab-allow local system administator log in. Then you can log in as root:D I got this tip from the website in my last post. I only checked that website after submitting that post:o

My connection is working without using the 2g / 3g setting. It came up with a string eror in the terminal.

Thanks again Tazz:D One question out of interest: will i only need the default dialer settings if using a normal telkom dial-up connection?
 
Hi Tazz

I need to pick your brain about a few more things if you don't mind :D :
How do I check my current upload / download data while connected?
How do I disconnect?

Thanks

Akash

Edit: I sent this post from Linux using a Virgin Mobile sim:D
 
Disconnecting...

How do I disconnect?

One way would be to create a new section in your /etc/wvdial.conf file, modelled on the section you currently use to connect. In my case, I connect using
Code:
[Dialer hsdpa]
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
I would copy/paste/edit that to have the new section such as
Code:
[Dialer hangup]
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
ISDN = 0
Modem Type = Analog Modem

Then, to disconnect from the Internet, issue the command
Code:
wvdial hangup

All you'd be doing in this case is 'talking' to your modem and sending it the reset (ATZ) command. There may well be a more elegant method or AT command (ATH0?) but I would imagine this would work.

Disclaimer: I do not purport to be anything than a newcomer and neophyte! I'm writing this only to provide a starting point - and one more learned may well now extend/replace this approach!

Nick
 
Hey Sky,

ifconfig ppp0 will show the interface stats - total bytes send and recv.

There is a few other apps that will show transfer rate and the likes:

iptraf
iftop
ntop (overkill)

and that is about the list I can dig up this early.

To end the connection, simply kill pppd, or the wvdial command with CTRL-C or
Code:
killall -9 wvdial
OR
killall -9 pppd

Happy surfing !

Hi Tazz

I need to pick your brain about a few more things if you don't mind :D :
How do I check my current upload / download data while connected?
How do I disconnect?

Thanks

Akash

Edit: I sent this post from Linux using a Virgin Mobile sim:D
 
Must say I have never tried/thought of this....intresting...Even thou, off the bat, I would say that it will cause a "port is in use" error, I will still give it a go.

Good one Nick !

One way would be to create a new section in your /etc/wvdial.conf file, modelled on the section you currently use to connect. In my case, I connect using
Code:
[Dialer hsdpa]
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
I would copy/paste/edit that to have the new section such as
Code:
[Dialer hangup]
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
ISDN = 0
Modem Type = Analog Modem

Then, to disconnect from the Internet, issue the command
Code:
wvdial hangup

All you'd be doing in this case is 'talking' to your modem and sending it the reset (ATZ) command. There may well be a more elegant method or AT command (ATH0?) but I would imagine this would work.

Disclaimer: I do not purport to be anything than a newcomer and neophyte! I'm writing this only to provide a starting point - and one more learned may well now extend/replace this approach!

Nick
 
hey tazz,

your internet connection sharing instructions all work fine.

but...

all the machines on the network are still unable to connect to the internet throught the linux box.

what info do you need to be able to determine what might be wrong/missing?

thx
sw
 
Not much...basically, the other machines must have the Linux machine as the gateway, has some working dns servers etc. The quickest way to see if it's working is to ping an ip adress of say google or so. If you put all those rules in place, make sure that connection forwarding is active.You can check it using the following command:
Code:
cat /proc/sys/net/ipv4/ip_forward
If that returns zero, set it to 1 using the following command:
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward

Otherwise, run tcpdump -i <internal interface> -n and see if the traffic reaches the box. If it does, run tcpdump -i <public interface> -n and see "what" leaves the box. if the IP is your internal IP, then your masq/natting isn't working.

Laterz !

hey tazz,

your internet connection sharing instructions all work fine.

but...

all the machines on the network are still unable to connect to the internet throught the linux box.

what info do you need to be able to determine what might be wrong/missing?

thx
sw
 
Yip - that is the installer...You do get the LiveCD with a GUI install, but I tried it in the alpha stages without success ;)

To me, it doesn't matter, Linux is Linux, I mean - it could be worst...you could be on vista ;)

Laterz !

Got a Gentoo disk off the freedom toaster, but it only seems to be able to boot into command line. I cant run x and have no idea how to get it installed. I'm fairly new to linux, and ubuntu's setup process is dead simple, which is why it grabs my attention...
 
thx, will give it a try tonight.

Not much...basically, the other machines must have the Linux machine as the gateway, has some working dns servers etc. The quickest way to see if it's working is to ping an ip adress of say google or so. If you put all those rules in place, make sure that connection forwarding is active.You can check it using the following command:
Code:
cat /proc/sys/net/ipv4/ip_forward
If that returns zero, set it to 1 using the following command:
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward

Otherwise, run tcpdump -i <internal interface> -n and see if the traffic reaches the box. If it does, run tcpdump -i <public interface> -n and see "what" leaves the box. if the IP is your internal IP, then your masq/natting isn't working.

Laterz !
 
dude, i'm trying sooooooo hard to get away from using any microsoft product whatsoever... so, yes... agreed... it could be much worse....

Yip - that is the installer...You do get the LiveCD with a GUI install, but I tried it in the alpha stages without success ;)

To me, it doesn't matter, Linux is Linux, I mean - it could be worst...you could be on vista ;)

Laterz !
 
Huawei and PIN

Thanks, it made all the difference. I simply disabled the pin and everything worked...

try this:

Code:
wvdial pin && sleep 10 && wvdial <normal command>

You have to wait a couple of seconds before dialing after sending a pin :)
 
One way would be to create a new section in your /etc/wvdial.conf file, modelled on the section you currently use to connect. In my case, I connect using
Code:
[Dialer hsdpa]
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
I would copy/paste/edit that to have the new section such as
Code:
[Dialer hangup]
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
ISDN = 0
Modem Type = Analog Modem

Then, to disconnect from the Internet, issue the command
Code:
wvdial hangup

All you'd be doing in this case is 'talking' to your modem and sending it the reset (ATZ) command. There may well be a more elegant method or AT command (ATH0?) but I would imagine this would work.

Disclaimer: I do not purport to be anything than a newcomer and neophyte! I'm writing this only to provide a starting point - and one more learned may well now extend/replace this approach!

Nick

That doesn't work for me. Comes up with modem not responding.
 
Hey Sky,

ifconfig ppp0 will show the interface stats - total bytes send and recv.

There is a few other apps that will show transfer rate and the likes:

iptraf
iftop
ntop (overkill)

and that is about the list I can dig up this early.

To end the connection, simply kill pppd, or the wvdial command with CTRL-C or
Code:
killall -9 wvdial
OR
killall -9 pppd

Happy surfing !

Hi

From the commands you gave only the following works in Ubuntu: Ifconfig ppp0, CTRL-C, killall -9pppd:)
 
Disconnecting...

That doesn't work for me. Comes up with modem not responding.

When you create the new [Dialler hangup] section, you need to do it with the same details that are in the section that you use to dial with. In particular, the line that (in my example) says "Modem = /dev/ttyUSB0" needs to be same as the line that you are using when you dial the modem with wvdial. When I was using a Vodaphone PCMCIA card, for instance, that line was "Modem = /dev/ttyS0"

I see that Tazz Tux has given some options that work. The 'killall' approach is basically zapping the process that was used to dial your modem - should certainly be a killer! And probably better than what I described...

Nick
 
Hey Nick,

Yeah - my option is a tad harse :) Can you tell us how you get wvdial to release the modem port, since it will always be in use? Maybe there is something different that we are missing?

Laterz !

When you create the new [Dialler hangup] section, you need to do it with the same details that are in the section that you use to dial with. In particular, the line that (in my example) says "Modem = /dev/ttyUSB0" needs to be same as the line that you are using when you dial the modem with wvdial. When I was using a Vodaphone PCMCIA card, for instance, that line was "Modem = /dev/ttyS0"

I see that Tazz Tux has given some options that work. The 'killall' approach is basically zapping the process that was used to dial your modem - should certainly be a killer! And probably better than what I described...

Nick
 
Hey Nick,

Yeah - my option is a tad harse :) Can you tell us how you get wvdial to release the modem port, since it will always be in use? Maybe there is something different that we are missing?

Laterz !

You have, appropriately, called my bluff! I'm between Vodaphone connections just now, in fact, having relinquished my PCMCIA card and not yet got the Huawei E220 working. So what I was suggesting was from memory, mostly, based on what I was remembering from the PCMCIA card. I *thought* that was how I was getting it to disconnect, but don't have the card to remember completely what I was doing.

I would have thought that sending the card a reset would have, in effect, given a disconnect? But honestly, my memory on how I was disconnecting is fading - and I make no suggestion of doubting your call on this...

I've still been plugging away at trying to get the E220 working, but simply don't have the capability to do it - I'm looking forward to you getting one to work with!

SUMMARY: Don't follow my suggestions re: disconnecting.

Nick
 
Status
Not open for further replies.
Top
Sign up to the MyBroadband newsletter
X