LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   connection sharing (https://www.linuxquestions.org/questions/linux-networking-3/connection-sharing-318586/)

the_imax 04-29-2005 08:48 PM

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

musicman_ace 04-29-2005 10:17 PM

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

Half_Elf 04-30-2005 09:21 AM

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"


All times are GMT -5. The time now is 09:13 AM.