Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Networking
Reload this Page Internet Connection Sharing Problem
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Networking Hardware/Software related, Modems, Internet connection sharing, IPTables etc.

Reply
 
Thread Tools Display Modes
Old 05-19-2008   #1 (permalink)
Just Joined!
 
Join Date: May 2008
Posts: 2
Internet Connection Sharing Problem

I have googled this to death, followed countless tutorials and not had any joy, so here goes:

I am trying to set up a router to provide internet access (among other things, just getting the internet to work for now) to a number of desktops and laptops.

I have followed a number of different tutorials, all of which seem to insist I need to:
  • Set up a DHCP server
  • Create firewall rules
  • Some say I need to install ipmasq and dnsmasq


I have set up a working DHCP server.

/etc/dhcp3/dhcpd.conf

Code:
ddns-update-style none;

default-lease-time 600;
max-lease-time 7200;
log-facility local7;

subnet 192.168.1.0 netmask 255.255.255.0 {
	authoritative;
	range 192.168.1.0 192.168.1.254;
	option routers 192.168.1.1;
	option domain-name-servers 192.168.2.1;
	}
I have also set up the firewall rules:

/etc/iptables.up.rules

Code:
# Generated by iptables-save v1.3.8 on Wed May  7 15:48:06 2008
*nat
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o wlan0 -j MASQUERADE
COMMIT
# Completed on Wed May  7 15:48:06 2008
# Generated by iptables-save v1.3.8 on Wed May  7 15:48:06 2008
*mangle
:PREROUTING ACCEPT [102:15465]
:INPUT ACCEPT [99:15345]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [75:11388]
:POSTROUTING ACCEPT [83:12602]
COMMIT
# Completed on Wed May  7 15:48:06 2008
# Generated by iptables-save v1.3.8 on Wed May  7 15:48:06 2008
*filter
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
# Internal Network
-A INPUT -i eth0 -j ACCEPT
# Local Loopback
-A INPUT -i lo -j ACCEPT
# Existing connections
-A INPUT -m state -i wlan0 --state ESTABLISHED,RELATED -j ACCEPT
COMMIT
# Completed on Wed May  7 15:48:06 2008
The only line in that that does anything at the moment should be:
Code:
-A POSTROUTING -o wlan0 -j MASQUERADE
I have been using webmin to set these services up, so there should be no problem with the config files.

The problem:
The laptop I am using cannot connect to the internet

Connections:
Internet
-->
Virgin Cable Modem
-->
Belkin Wireless Router (basic config)
192.168.2.1
--> (Wireless)
192.168.2.2 (DHCP) (wlan0)
Ubuntu 8.04 Server
192.168.1.1 (eth0)
--> (Wired)
192.168.1.254 (DHCP) (eth0)
Laptop

The situation:
  • Server and laptop both running Ubuntu 8.04 fully updated
  • Laptop can reach wireless router through server (192.168.2.1)
  • Server can reach the internet
  • Laptop cannot reach internet (no ping, or web browsing)

I currently do not have ipmasq or dnsmasq installed because when I do install them, the server can no longer browse the internet or the router.

Also, I have checked IP forwarding and it is enabled.

Hope this is enough information for someone to see what I'm doing wrong.

Thanks

Gary
garysteinert is offline   Reply With Quote
Old 05-20-2008   #2 (permalink)
Linux Newbie
 
athlon_crazy's Avatar
 
Join Date: Sep 2007
Location: Malaysia
Posts: 132
What nameserver your laptop currently use?
__________________
www.no-x.org
athlon_crazy is offline   Reply With Quote
Old 05-20-2008   #3 (permalink)
Just Joined!
 
Join Date: May 2008
Posts: 2
Re: Internet ConnectionSharing Problem

It uses 192.168.2.1. But either way, I thought the DHCP server assigned that?

Thanks

Gary
garysteinert is offline   Reply With Quote
Old 05-20-2008   #4 (permalink)
Linux Newbie
 
athlon_crazy's Avatar
 
Join Date: Sep 2007
Location: Malaysia
Posts: 132
Yes but probably the server prevent your laptop talking to DNS services port 53. Try open this tcp udp port first..
__________________
www.no-x.org
athlon_crazy is offline   Reply With Quote
Old 05-22-2008   #5 (permalink)
Just Joined!
 
Join Date: May 2008
Location: NYC, moved from KS, MO
Posts: 91
Gary,
got a few questions:
  1. How is your laptop connected to the desktop? Is it through a crossover cat5 cable, or a switch or else?
  2. Can your laptop ping the Internet through IP? For example, 64.233.167.99 (one of google's IPs)
  3. I know you mentioned ip forwarding in your post but I would like to know how you determined that ip forwarding is enabled.
secondmouse is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
 

Free Magazines
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 12:24 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0