LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to configure Internet Connection Sharing in Fedora 4 (https://www.linuxquestions.org/questions/linux-software-2/how-to-configure-internet-connection-sharing-in-fedora-4-a-399314/)

raport 01-04-2006 01:39 AM

How to configure Internet Connection Sharing in Fedora 4
 
dear friends,

how do you configure internet connection in fedora 4. i tried to use the configuration in redhat 9 but it doesn't work.

thanks for any help

raport

timmeke 01-04-2006 01:42 AM

Could you please provide additional information, like:
-how you want to "share" connections (eg via a NAT router, etc)
-how you've accomplished it in RH9
-what exactly you want to do with it
-etc

dalponis 01-04-2006 03:11 PM

Yes, I have no idea how to even begin this. Please, someone help!

http://www.linuxcompatible.org/inter...ng_t33606.html
I found that. Is it any good?

timmeke 01-05-2006 01:40 AM

There are many alternatives. The one discribed on the link you provided may work, in case you have
your internet connection is directly branched to one PC and you that PC is then further connected to
your network via a 2nd network card.

What I'm trying to say is... it really depends on your network's setup (and also somewhat on your internet
setup). So, please give us more details, like
computer 1 is branched to internet
computers 2 and 3 are branched to computer 1 only. I'd like for them to use the internet connection that has
been set up on computer 1.
etc

dalponis 01-05-2006 05:15 PM

Here's my current setup.

Linux Machine:
wlan0
IP: 192.168.1.25
Subnet Mask: 255.255.255.0
Gateway: 192.168.1.1

eth0
IP: 192.168.0.1
Subnet Mask: 255.255.255.0
Gateway: null

Windows Machine:
Local area network:
IP: 192.168.0.2
Subnet Mask: 255.255.255.0
Gateway: 192.168.0.1

I want to forward the internet to my second computer(Windows) from the first(Linux).

I use a cross over cable.

dalponis 01-05-2006 09:12 PM

const FIRST_PAGE as integer = 1

If postLevel < FIRST_PAGE Then
bump()
End-If

timmeke 01-06-2006 01:32 AM

Quote:

Originally Posted by dalponis
wlan0
IP: 192.168.1.25
Subnet Mask: 255.255.255.0
Gateway: 192.168.1.1

Is this wireless connection to your (wireless) internet modem?
I only see 192.168.*.* addresses, which are - by definition - always internal on a network.
For your internet to work, however, one of your machines must have a modem, router, firewall or something that contacts the outside world (your ISP, probably).

If this modem/router/.... provides NAT (network address translation), possibly DHCP and multiple connections, you may be better off hooking both your Linux and Windows boxes to
it directly.

Quote:

Originally Posted by dalponis
eth0
IP: 192.168.0.1
Subnet Mask: 255.255.255.0
Gateway: null

Since you say that you're using a cable, I suppose it's hooked up to eth0 on your Linux box.

Quote:

Originally Posted by dalponis
Windows Machine:
Local area network:
IP: 192.168.0.2
Subnet Mask: 255.255.255.0
Gateway: 192.168.0.1

For your Linux box to act as a gateway, it must be set up for routing (ie it must act as a router).
See:
man route
for that.

raport 01-06-2006 02:09 AM

here's what i did which i applied both in redhat9 and Fedora core 4.

the system is this.

8 PC's connects to a hub one of the PC's connects to a modem and internet

for the PC that connects to the internet:

1.edit /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
HWADDR=00:04:75:AD:39:E5
ONBOOT=yes
TYPE=Ethernet
IPADDR=192.168.0.1
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
USERCTL=no
PEERDNS=no

2. /etc/sysctl.conf

# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 1

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel


kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies

3./etc/sysconfig/network

NETWORKING=yes
HOSTNAME=rporticio.mydomain.com

4. /etc/rc.d/rc.local

touch /var/lock/subsys/local
mount /dev/hdb2 /redhat
iptables -t nat -D PREROUTING -i eth0 -j loc_dnat
iptables -t nat -A POSTROUTING -o ppp+ -j MASQUERADE

5. /etc/resolv.conf DNS of the ISP

search localdomain
nameserver 61.9.19.1
nameserver 61.9.19.2
nameserver 61.9.19.3

for the other PC's in windowsOD and linux I set the gateway to the IP address of the PC connected to the modem.

this works fine in redhat9 as OS of the PC connected to internet but very slow in fedore core 4 as of of the PC connected to the internet.

i just wondered why.

thanks for any help.

raport

raport 01-06-2006 02:13 AM

dear friends,

here's what i did which i applied both in PC having redhat9 and Fedora core 4 OS.

the system is this.

8 PC's connect to a hub and one of the PC's connects to a modem and to internet.

For the PC that connects to the internet:

1.edit /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
HWADDR=00:04:75:AD:39:E5
ONBOOT=yes
TYPE=Ethernet
IPADDR=192.168.0.1
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
USERCTL=no
PEERDNS=no

2. /etc/sysctl.conf

# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 1

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel


kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies

3./etc/sysconfig/network

NETWORKING=yes
HOSTNAME=rporticio.mydomain.com

4. /etc/rc.d/rc.local

touch /var/lock/subsys/local
mount /dev/hdb2 /redhat
iptables -t nat -D PREROUTING -i eth0 -j loc_dnat
iptables -t nat -A POSTROUTING -o ppp+ -j MASQUERADE

5. /etc/resolv.conf DNS of the ISP

search localdomain
nameserver 61.9.19.1
nameserver 61.9.19.2
nameserver 61.9.19.3

for the other PC's in windowsOS and linux I set the gateway to the IP address of the PC connected to the modem.

this works fine in redhat9 as OS of the PC connected to internet but very slow internet connectivity in fedora core 4 as OS of the PC connected to the internet.


i just wondered why?

thanks for any help.

raport

timmeke 01-06-2006 03:06 AM

So, it actually works but is just slower then it should be?
That can depend on a lot of issues. Have you tried things like traceroute (on the non-internet connected hosts) or a packet capturing tool (on the internet connected machine), just to see what's happening.
Are you sure nothing else is slowing down your FC machine? Eg other processes, other daemons, etc (try "top")?
Furthermore, your FC machine is hooked up to the internet via a wireless connection. Are you sure it's configured for maximum speed (ie in the same way as on your old box)? Since your FC machine "forwards" the internet connection to all your other machines, it may just be your internet setup that's causing the delays.
You could try this by browsing a few sites on the FC machine, for instance.

As to the actual configuration, I'm just a newbie, so you might want to ask the moderator to put this thread in the Linux - Networking forum.

dalponis 01-07-2006 12:04 AM

Well, I tried what you guys suggested. The internet does not get forwarded. My Windows machine does not surf the net...

Do you have more questions about my setup? Yes, the wlan0 is my wifi connnection to the router. Yes, the eth0 is the cross over connection to my Windows machine.

dalponis 01-07-2006 10:30 AM

I've started a new thread... As this one isn't really mine.

I'm using Arno's IPTables-Firewall Script now.

raport 01-08-2006 06:46 PM

before trying to look into your suggestions, i changed the gateway of my PC with fedora 4 OS that is formerly connected to the internet to the IP address of another PC with Redhat9 OS. This PC(with redhat 9 OS) is now connected to the internet. Suddenly, internet surfing speed in fedora 4 is greatly improved! But this does not solve the problem, for i think fedora 4 should even have more capability in speed as a gateway being a new and upated linux OS than the older redhat9.


All times are GMT -5. The time now is 05:52 AM.