Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-04-2006, 01:39 AM
|
#1
|
Member
Registered: Aug 2004
Location: Legazpi City, Philippines
Posts: 77
Rep:
|
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
|
|
|
01-04-2006, 01:42 AM
|
#2
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
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
|
|
|
01-04-2006, 03:11 PM
|
#3
|
Member
Registered: Jan 2006
Location: Alberta, Canada
Distribution: Fedora 19 x86_64
Posts: 96
Rep:
|
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?
Last edited by dalponis; 01-04-2006 at 03:13 PM.
|
|
|
01-05-2006, 01:40 AM
|
#4
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
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
|
|
|
01-05-2006, 05:15 PM
|
#5
|
Member
Registered: Jan 2006
Location: Alberta, Canada
Distribution: Fedora 19 x86_64
Posts: 96
Rep:
|
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.
Last edited by dalponis; 01-05-2006 at 06:40 PM.
|
|
|
01-05-2006, 09:12 PM
|
#6
|
Member
Registered: Jan 2006
Location: Alberta, Canada
Distribution: Fedora 19 x86_64
Posts: 96
Rep:
|
const FIRST_PAGE as integer = 1
If postLevel < FIRST_PAGE Then
bump()
End-If
|
|
|
01-06-2006, 01:32 AM
|
#7
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
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.
|
|
|
01-06-2006, 02:09 AM
|
#8
|
Member
Registered: Aug 2004
Location: Legazpi City, Philippines
Posts: 77
Original Poster
Rep:
|
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
|
|
|
01-06-2006, 02:13 AM
|
#9
|
Member
Registered: Aug 2004
Location: Legazpi City, Philippines
Posts: 77
Original Poster
Rep:
|
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
Last edited by raport; 01-06-2006 at 03:02 AM.
|
|
|
01-06-2006, 03:06 AM
|
#10
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
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.
|
|
|
01-07-2006, 12:04 AM
|
#11
|
Member
Registered: Jan 2006
Location: Alberta, Canada
Distribution: Fedora 19 x86_64
Posts: 96
Rep:
|
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.
Last edited by dalponis; 01-07-2006 at 10:29 AM.
|
|
|
01-07-2006, 10:30 AM
|
#12
|
Member
Registered: Jan 2006
Location: Alberta, Canada
Distribution: Fedora 19 x86_64
Posts: 96
Rep:
|
I've started a new thread... As this one isn't really mine.
I'm using Arno's IPTables-Firewall Script now.
Last edited by dalponis; 01-07-2006 at 04:01 PM.
|
|
|
01-08-2006, 06:46 PM
|
#13
|
Member
Registered: Aug 2004
Location: Legazpi City, Philippines
Posts: 77
Original Poster
Rep:
|
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.
Last edited by raport; 01-08-2006 at 06:51 PM.
|
|
|
All times are GMT -5. The time now is 01:55 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|