Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
I wonder if I could share my LAN connection with other Computer, W$ndows XP installed on it...
Background:
I have two PCś I can share my LAN Connection from xp to Fedora Through "Share My Connection " option. I have two LAN Cards Installed on my new PC,
1. Through first LAN Card I am connected to my LAN server.
2. Through Second LAN Card My Both PCs are connected together by CAT5 Crossed Wire cable..
Problem:
I don't know how to configure Fedora 9 to make it share LAN connection with my other pc ?
Is there any "Connection Sharing Option " like W$ndows?
If you want a connection sharing option, you can install firestarter, and check the box for Internet Connection Sharing..
It should be in the repository for your Distro..
Is there any "Connection Sharing Option " like W$ndows?
If you need a GUI, then farslayer has given you the right path. If you just want to bridge traffic from one card to the other, you need to create a network bridge on the Fedora box. You will need bridge-utils installed. Here are the steps
Code:
$ brctl addbr bridge0 # Create the bridge
$ brctl addif bridge0 eth0 # Add an interface to the bridge
$ brctl addif bridge0 eth1 # Add an interface to the bridge
$ ifconfig eth0 0 # Remove the IP address from the interface
$ ifconfig eth1 0 # Remove the IP address from the interface
$ ifconfig bridge0 x.x.x.x # Give the bridge an IP address
If you are using DHCP for the IP address of the Fedora box, you might have to kill dhclient. Run "ps aux | grep dhc" to see what kind of DHCP client might be running.
If you need to make all this permanent, there are several ways to do it. If you need to know how, please post a reply to this thread.
There are several GUI-based firewall/router packages. There are also some good canned packages that perform the same purpose. The one I prefer and recommend is http://homelansecurity.sourceforge.net/index.php.
There are examples of how to customize your setup, and it runs right out of the box with very simple configurations.
You may want to run a DHCP server on the firewall, to replace the functionality of your ISP's DHCP if you were using that for your local LAN hosts.
--- rod.
Yes of Course I would love to hear form you in detail...
Are you sure?
Quote:
Originally Posted by baig
I have only on pc as my client and i am my self a client to LAN server..
So let me know how to make it permanent..??
The easy way is to add the commands to "/etc/rc.local". The hard way is to write an init script for your system.
If you do not use a splash screen at boot up, an init script can give you visual feedback about whether or not your script succeeded (e.g. the [OK] and [FAIL] messages that show up during boot).
If you do add your commands to "rc.local", you will probably want to make sure you handle errors gracefully. If one of your commands fails, the "rc.local" script will exit, and anything after your commands will not get executed.
You will also want to add logging.
Here is an example of what you might add to "rc.local":
Code:
# Create a network bridge and use DHCP to get an IP address
BRIDGE=bridge0
INTERFACES="eth0 eth1"
LOGFILE="/var/log/bridge.log"
rm -f $LOGFILE
echo "Creating bridge..." >> $LOGFILE 2>&1
if [ ! /usr/sbin/brctl addbr $BRIDGE >> $LOGFILE 2>&1 ] ; then
echo "Failed." >> $LOGFILE 2>&1
exit 0
fi
echo "Done." >> $LOGFILE 2>&1
for nic in $INTERFACES ;
do
echo "Adding interface ${nic}..." >> $LOGFILE 2>&1
if [ ! brctl addif $BRIDGE $nic ] ; then
echo "Failed." >> $LOGFILE 2>&1
exit 0;
fi;
done
echo "Done." >> $LOGFILE 2>&1
echo "Getting IP address for bridge ${BRIDGE}..." >> $LOGFILE 2>&1
if [ ! dhclient $BRIDGE ] ; then
echo "Failed." >> $LOGFILE 2>&1
exit 0
fi
echo "Done." >> $LOGFILE 2>&1
Obviously, this could be improved. The biggest problem is that it does not remove the bridge if adding one of the interfaces fails.
Why not go the easy route and install a router? I have a Linux box and a WinXP box connected to a router,
and it works great. If you're simply looking for a way for two different systems to access the Internet, IMHO, that's the best route to go. Not sure if your looking to be able share files between the two, but if it's just Internet access, give that some thought. A router is pretty easy to set up. If you decide to go that route and need help setting it up, I'm sure you'll find a lot of people willing to help out.
But if I simply connect a router then who is going to learn every aspect of Networking? ;-) Never mind!!
The situation will be even more worse than this if I go for a router because till now I don't know anything more that its definition. I do share my printer, Combo and File system inbetween my both pcs. Only one connection can be made at a time using my LAN CABLE... so I need to be acting like Server for my old pc...
Situation is under control with the help of Firestater firewall.
Am able to share my net connection from Fedora 9 to windows.. and I have to run DHCP for my single coz there were probs in static configuration.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.