LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-29-2005, 08:48 PM   #1
the_imax
Member
 
Registered: Apr 2004
Distribution: RHEL 4/ CentOS
Posts: 159

Rep: Reputation: 30
connection sharing


I want to share an internet connection between a PC running FC and other having WInXp the PC with FC has a usb cable modem connection
Both PC's are connected to each other through LAN Cards

I had installed the dhcp server package on FC and my config file is

Code:
ddns-update-style none;

subnet 192.168.1.0 netmask 255.255.255.0
{
        range 192.168.1.100 192.168.1.200;
        option subnet-mask 255.255.255.0;
        option broadcast-address 192.168.1.255;
        option domain-name-servers 203.81.192.10, 203.81.192.17;
        option routers 192.168.1.1;

        host fedora
        {
                hardware ethernet 00:40:7b:79:71:17;
                fixed-address 192.168.1.7;
        }

        host winxp
        {
                hardware ethernet 00:50:04:CE:86:AE;
                fixed-address 192.168.1.8;
        }
}

the connection properties in windows show the correct Ip address and mac (as assigned in the file ) but still I can't broswe in windows ? the browser tries for a while after which I get the page cannot be displayed error

I am also posting the output of ifconfig

Code:
[root@localhost root]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:50:BA:CB:96:E7
          inet addr:192.168.1.200  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::250:baff:fecb:96e7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2328 errors:0 dropped:0 overruns:0 frame:0
          TX packets:528 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:190949 (186.4 Kb)  TX bytes:63281 (61.7 Kb)
          Interrupt:11 Base address:0xd800

eth1      Link encap:Ethernet  HWaddr 00:40:7B:79:71:17
          inet addr:203.81.224.10  Bcast:203.81.224.255  Mask:255.255.255.0
          inet6 addr: fe80::240:7bff:fe79:7117/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:244816 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8357 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:18272840 (17.4 Mb)  TX bytes:1329150 (1.2 Mb)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:3093 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3093 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3381270 (3.2 Mb)  TX bytes:3381270 (3.2 Mb)

sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


Please help me I really do need to get this setup to work
 
Old 04-29-2005, 10:17 PM   #2
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
If you haven't done so, you'll need to enable packet forwarding. This is normally done through the firewall script, but the actual enabling of forwarding is

echo 1 > /proc/sys/net/ipv4/ip_forward    I really hope I got that right since I'm on a Windows box right now.

An example firewall that will do this and more is at iptablesrocks.org

Last edited by musicman_ace; 04-29-2005 at 10:19 PM.
 
Old 04-30-2005, 09:21 AM   #3
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
DHCP doesnt share connection, it only gives your client an ip adress.
You'll need a NAT firewall rule to then make the link between them and the internet.

Search the web a bit about iptables and "NAT" or "MASQUERADE"
 
  


Reply



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
Connection Sharing brokenflea Slackware 2 12-05-2003 11:06 AM
idea: sharing net connection, method: iptables..., problem: broken net connection :( danny2055 Linux - Networking 4 06-09-2003 07:00 AM
Sharing a connection carrja99 Linux - Networking 3 04-23-2003 08:08 PM
Connection sharing buckeyejerry Linux - Networking 1 01-13-2003 05:50 AM
Connection Sharing axon2 Linux - Networking 1 06-13-2001 03:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:45 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration