LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-30-2007, 06:54 AM   #1
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 652

Rep: Reputation: 42
Question sharing an evdo broadband connection


Thanks Ladies & Gentlemen for all the excellent advice.


Objective:
Share internet connection established with Motorola E815 cell phone via usb (through put somewhere around 700k).

I can use either a Compaq Pesario desktop or an HP dv900 series laptop.

The desktop is somewhat dated (s4020wm). It is dual-boot (Debian testing & xp) because I can't get the wife to leave windows behind it runs on xp most of the time. I would prefer to use this machine because it is stationary and hardwired to the wireless router (Netgear wnr834m). The laptop gets moved all over the place and the data cable connection on the cell is touchy and so it is easy to loose the connection.

I need to be able to share this connection from both Debian and xp. One of the problems I have to solve is that apparently xp when set up with ICS it starts dhcp and so I have read it can't be turned off. I also have two networked printers that need static ip's and an old Packard Bell desktop running w98 on my network. Occasionally I expect to have visitors with laptop connected too.

I already have the internet connection set up in both os's. From what I have read setting it up to share in linux with iptables seams a little daunting. I have looked at this how-to http://www.debuntu.org/iptables-how-...net-connection. There is much I don't understand and my time is very limited. So several weeks reading to come to a through understanding are out of the question. Is this script safe to use as it is? How about some other good how-to's or tutorials?

I do understand that a dial-up line, which is basically what I have, is relatively safe from being cracked because it comes and goes and has it's ip changed all the time. So on the surface it seams safe to me to use the fore mentioned script as is.

A little history on the testing install on the desktop. It started out as stable (sarge), was upgraded to testing (etch) and most recently to testing (lenny). There are some upgrades that it still needs, for instance the kernel is 2.6.18 and really should be updated because I get the fuse error. There is also a package that persists in wanting to remove opera so I have not updated it either. And of coarse those that have bugs listed against them I have not installed.

One thing I have noticed that I will have to change in the script is the reference to the wan=eth0. Since my connection is established on /dev/ttyACM0 would I make that line read wan=/dev/ttyACM0 ? Seams logical to me, but.

Another issue I see, as mentioned before is that xp will force me to use dhcp from my linux os too. Anyone know of a good debian based how-to or tutorial for setting up dhcp? I will (I think) need to have 3 static ip's set up (the two printers and the wireless router). I know that through the d-link router (DI-604) I had in my setup at one time, that it would grant internet service to a static ip that was not defined in the filters. My son used that method to circumvent my parental controls one time by setting a static ip on his box.

Firewalls. In the past I have always had a hardware firewall between my cable modem and my network. Now that is not a viable option. What is a good one that is easy to configure through the gui? Besides the fore mentioned Netgear router has very pour firewall capabilities, the D-link is much better.

So mostly I am looking for advice before I jump in. Breaking my linux system is an option that I am not impressed with very much.

Several days later.

I have the system working in this configuration.

Desktop Preserio when running xp sharing it's internet connection and providing dhcp.
Netgear router acting as a switch (dhcp turned off) and wireless access point
HP laptop running both Debian and vista succussfully obtaining internet access through the Desktop's connection.
Old Pakard Bell is also obtaining internet through the Desktop.
Networked HP LaserJet 4si (not connected to a computer) prints fine.
Other printer has not been hooked to the system yet.

I have not begun to set up the desktop in linux yet. The question I have to start with is: should I start the setup proccess by configuring the desktop to provide dhcp first or share it's internet connection? Or does it matter?

Once again, thanks for all the advice, and thanks for listening while I talk my way through.
 
Old 10-31-2007, 03:55 PM   #2
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
Easy method would be to install firestarter and check the ICS box in it's config to enable Internet connection Sharing..

http://www.fs-security.com/

There are links on their site to configuring the firewall, enabling DHCP on your distro, etc.. give it a read I think it may simplify what you are working on ..
 
Old 10-31-2007, 08:02 PM   #3
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 652

Original Poster
Rep: Reputation: 42
Thanks farslayer.

I see in reading the documentation on the firestarter site that for dial-up:
Quote:
The firewall must be started after you have established your connection to your ISP. In the Firestarter wizard there is an option to automatically start the firewall on dial-out. This option does not work with some dialers. For example, if you are using the kppp dialer application you will have to set up the dialer to start the firewall after a connection is established. Kppp includes an option to launch scripts when a connection is established which does the job nicely.
The thing is their site gives no hint as to what that script might look like. I know only enough about scripts to make the changes to an existing script as instructed by someone that knows what they are doing. Back in the day I did make a few simple dos batch files that would put bmp files up on the screen when the boy was young to mess with him. As a guess from my limited knowlege, I would make a file named say "firestarter-launch.sh" with one line in it "firestarter".

Ok. I installed firestarter and dhcp-server from testing. I can't get eth0 to configure. Neither the cortrol center (kde) or networking (gnome) apps will sucessfully change the ip from dhcp to static which is needed for the dhcp server to work. I am sure that it can be done from the command line, but I don't know the commands to enter to set it to a static ip such as 192.168.0.1 with a mask of 255.255.255.0.

Another issue eth0 has is with the gateway. Apparently there is no way to point that to /dev/ttyACM0 where my usb modem is. It complains if I don't put anything in except an ip in standard syntax and even that it won't save.

I do have the 2.6.22-2-k7 kernel installed and running now. I also got around to pointing my apt sources.list to the debian opera repository and updating opera and the package that persisted in trying to remove opera. So the box is as up-to-date as much as it can be as of yesterday except for those packages with bugs aginst them.

As a side note: How serious is the bug listed aginst libdb4.6 #437650 - libdb4.6: FTBFS on s390: in testsuite, run_subsystem: env env007: env66: mmap: Cannot allocate memory? I have several packages that I have not upgraded because they depend on libdb4.6. As I recall none of them involve network configuration, but.

As another side note: I have noticed that xp does not supply a very stable connection through the E815. It also corrupts the os in the phone requiring a reboot.

Thanks again
 
Old 11-01-2007, 09:23 PM   #4
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
to set a static IP on the interface edit the /etc/network/interfaces file



Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
broadcast 192.168.0.255
Something along those lines...

the commands to get there quickly...
su -
<enter root password>
ifdown eth0
nano /etc/network/interfaces

<edit file>
CTRL+o to save changes
CTRL+x to exit the editor
ifup eth0


you would disable firestarter from automatically starting by using a tool like sysv-rc-conf Simply un-check the box next to firestarter in runlevel 2

The script to start firestarter manually would more likely contain something along these lines..
Code:
#!/bin/sh
/etc/init.d/firestarter start

eth0 would not have a gateway defined. It's an internal interface so it has no need for agateway address. the evdo device should automatically define a default gateway for your box.

I'm not sure offhand exactly what you may need in your interfaces file for the wireles card connection..

Last edited by farslayer; 11-01-2007 at 09:30 PM.
 
Old 11-01-2007, 09:30 PM   #5
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 652

Original Poster
Rep: Reputation: 42
Thumbs up

Thanks to all.

I have success. As usual reading google and thinking on it brings clarity. The reason I could not change my ip to static was because the inteface has to be disabled first. You would think the gui programs that alter the network cards would be smart enough to know that and shut down the card befor applying the change. I did not see this clearly stated but reading trigered the notion. So for all the super newbies, reading the same thing over and over in different posts actually dose do some good sometimes.

Then it was a simple matter to get the dhcp server running and make a few simple changes than I read about. After that Firestarter reconized eth0 and that must have caused it to be able to see the cell phone.

I haven't mentioned it befor in this post. The Motorola E815 must have a very senitive os in it. It seams to get confused perty easy when it is faced with lots of internet connection restarts. The icons on it's screen sometimes lie about what it is doing. It will clame to be still connected to broadband even after it is unhooked from the cable. A simple reboot seams to fix this. It seams to be worse on xp than vista and debian.

Once again thanks to all.

Thanks farslayer.

I already had it up and running before I saw your post. I will be using the script idea you posted. I will have to get firestarter to launch as a regular user for it to work though. I did see instructions for that somewhere but didn't read them. Now I will have to find them again.

Last edited by rbees; 11-01-2007 at 09:38 PM.
 
Old 11-05-2007, 03:15 PM   #6
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 652

Original Poster
Rep: Reputation: 42
Thanks to all.

Some things to report. I am having connection stability issues. The stability is much better in lenny than xp. But still I get droped with error code 15 & 16. 16 is that the modem hung up and 15 has something to do with a peer not responding to echo requests. Not sure what that means or what to do about it. Ofcourse xp dosen't tell you anything about why it is droping the connection, but that dosen't really matter as I use lenny most of the time to share the connection.

I suppose that where I put the script is not that important. I can point kppp to it where ever I put it. My question is, is there a perhaps better place to put it so that upgrades and what not wont mess with it?

A nother feature I would like to get set up is to be able to cause the sharing computer to dial out when I want to from the laptop, and then start the firewall. Then when I am finnished cause it to hangup. I know about ssh, I think that is the program that does it, but have never used it or know anything about how to use it. Also I am not sure that that is the best way to implement what I want to achieve. Perhaps there is a better option simalar to the way firestarer sets up internet sharing over dialup.

Whatever I use to do this, it needs to be able to relay the error messeges so I can clear them and restart the connection. What about through a terminal?

I would really perfer a gui application to the command line but will use the command line if I have to.

Thanks for your advice.
 
Old 11-05-2007, 03:55 PM   #7
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
Dial on Demand and IP Masquerade how-to

http://handsonhowto.com/dodip.html

this may handle your Dial-on-demand request.. and ipmasq would replace the need for you to use firestarter.
 
  


Reply

Tags
dhcp, evdo, ics, modem


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharing evdo internet card gr3ygh0s1 Linux - Wireless Networking 1 07-21-2007 06:43 PM
sharing my broadband connection lothario Linux - Networking 3 04-19-2007 06:11 PM
Help sharing broadband connection between a Linux PC & a Win-Xp PC? ejames_nyc Linux - Newbie 8 10-01-2005 12:04 AM
Broadband sharing satimis Linux - Hardware 11 03-05-2004 06:01 PM
Sharing a broadband connection via a modem? BBlalock Linux - Networking 5 12-28-2002 05:09 PM


All times are GMT -5. The time now is 12:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration