How to share internet connection between 2 PC's

This is a discussion about How to share internet connection between 2 PC's in the Linux Networking category; Hi. I have an Internet connection configured in Linux (Redhat 9. 0) and I would like to know how I can share that internet connection with another local computer that uses Windows XP. I have already done this for Windows XP (using bridge), but now I don't know how I do that in Linux.

Linux Networking 361 This topic was started by , . Last reply by ,


data/avatar/default/avatar07.webp

1 Posts
Location -
Joined 2004-03-15
Hi. I have an Internet connection configured in Linux (Redhat 9.0) and I would like to know how I can share that internet connection with another local computer that uses Windows XP. I have already done this for Windows XP (using "bridge"), but now I don't know how I do that in Linux. Any help is appreciated!

Participate in our website and join the conversation

You already have an account on our website? To log in, use the link provided below.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This subject has been archived. New comments and votes cannot be submitted.
Mar 15
Created
Mar 15
Last Response
0
Likes
1 minute
Read Time
User User
Users

Responses to this topic


data/avatar/default/avatar12.webp

4 Posts
Location -
Joined 2004-03-05
What kind of connection do you have?
If you already navigating try this:
 
copy everything inside a file...
change the " " with your data
and run it..
 
Here it goes....
 
!#/bin/sh
 
LAN_IP_NET="your lan ip range (maybe 192.168.1.0/24)"
LAN_NIC="the internal network interface (eth0 or eth1)"
OUT_NIC="external network interface (eth0, eth1 or ppp0 and so on)"
 
iptables -t nat -A POSTROUTING -s $LAN_IP_NET -o $OUT_NIC -j MASQUERADE
iptables -A FORWARD -j ACCEPT -i $LAN_NIC -s $LAN_IP_NET
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
 
 
You should be navigating on XP by now....