# Internet Keeps Disconnecting (Ubuntu)



## sattu94 (Nov 24, 2008)

I Have Ubuntu 7.10. When i connect to the internet using terminal command sudo pon dsl-provider. it shows that pppoe is connected when i use net for some time like 30 seconds the connection gets disconnected. And i have to connect again using the same command again & again. Internet works fine on windows XP sp2 which i have on the same PC. This Problem occureed just a week ago before INternet used to work fine on Ubuntu also.So how do i solve this problem ??


----------



## lotuseclat79 (Sep 12, 2003)

First things first.

1) Do not use sudo to connect to your ISP provider. It makes it easier for your computer to be targeted and compromised - never ever connect to the Internet as root in Linux or admin in Windows.

2) Set up the /etc/wvdial.conf file in Linux as follows (edit when disconnected to Internet): I also have setup the wvdial.conf file in /etc as follows:
[Dialer Defaults]
Modem = /dev/ttyS0
Baud = 115200,N,8,1
SetVolume = 2
Dial Command = ATDT
Init0 = HUP
Init1 = ATZ
Init2 = AT&F1E0Q0V1&C1&D2S0=0
Init3 = ATS7=60S19=0M1&M4&K1&H1&R2&I0B0X4
Init4 = ATS10=255S11=40&U30&N39
Init5 = ATDT;
FlowControl = CRTSCTS

[Dialer phone1]
Dial Prefix = 1
Phone = <replace with 7-digit phone number>
Username = <replace with your ISP account username>
Password = <replace with your ISP account password>
Area Code = <replace with you phone's area 3-digit code: nnn>
Inherits = Dialer Defaults

[Dialer phone2]
Dial Prefix = 1
Phone = <replace with alternative 7-digit phone number>
Username = <replace with your username>
Password = <replace with your password>
Area Code = <replace with you phone's area 3-digit code: nnn>
Inherits = Dialer Defaults

...

When you issue the command: ls -lt /etc/wvdial.conf (and get the following line)
-rw-r----- 1 root dialout 66 2008-10-29 19:10 /etc/wvdial.conf
it informs you that all members of the dialout group can read the file which is invoked as follows, where ubuntu is a member of that group confirmed by issuing the command: [email protected]:~$ grep dialout /etc/group

To dialup to your ISP, issue the following command:
[email protected]:~$ wvdial phone1
or
[email protected]:~$ wvdial phone2
etc. ...

If you do not have a USR modem, then delete the following lines in the /etc/wvdial.conf file:
Init2 = AT&F1E0Q0V1&C1&D2S0=0
Init3 = ATS7=60S19=0M1&M4&K1&H1&R2&I0B0X4
Init4 = ATS10=255S11=40&U30&N39
and then make the Init5 line be Init2 (via editing).

My 56k ISP had about 8 phone numbers that I could issue by simply changing the last digit of the wvdial phone<n> command to values [n:1-8] for local access phone numbers which you insert into the wvdial.conf file via editing.

-- Tom


----------



## sattu94 (Nov 24, 2008)

Well its' a bit complicated for me but still i will try and can u please tell me what might be causing this problem because i am kinda new to 
linux(Ubuntu)but still i will try


----------



## sattu94 (Nov 24, 2008)

and we have the area code of 4 digits so what should i do ??


----------



## sattu94 (Nov 24, 2008)

we also have dynamic IP (INDIA)


----------



## lotuseclat79 (Sep 12, 2003)

Hi sattu94,

I would simply use the 4-digits for your area code as your phone system will recognize it.

Dynamic IP is DHCP and it will assign you a new IP address each time you call in, i.e. your ISP does not assign a static IP address to your computer.

I advise you to read my thread Ubuntu iptables HowTo and goto the link entitled "HOWTO: Set a custom firewall (iptables) and Tips [Beginners edition]" and implement that iptables firewall for your computer. I have commented out the interfaces for amule and bitorrent at the end of the script toward the bottom.

Also, Get the latest release of Ubuntu 8.10 LTS (Intrepid Ibex) by going to Requesting an Ubuntu CD for a Gnome environment or Requesting CDs from ShipIt for a KDE environment. They are free, but are shipped via snailmail, i.e. post office, it took 4 weeks for mine to arrive from England to Massachusetts, USA.

-- Tom


----------



## sattu94 (Nov 24, 2008)

Well I will surely try that and thanks for the linx


----------

