Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
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.
|
 |
10-23-2005, 11:19 AM
|
#1
|
Member
Registered: Sep 2005
Posts: 58
Rep:
|
Internet Sharing
After a couple days of sorting out my BT Voyager 100 with EciADSL Drivers ive got it working and i want to share it.
As far as i know i connect via PPP0 and i want to share it via ETH0.
How can this be done... I seen something about IP Forwarding...
But i dont know how to set it up...
|
|
|
10-23-2005, 12:17 PM
|
#2
|
Member
Registered: Sep 2005
Posts: 58
Original Poster
Rep:
|
Ok i got the connections working... i can ping from my Windows PC to my Linux PC. Only problem is when i open IE or FireFox on my Windows PC it doesnt load up the pages.
|
|
|
10-23-2005, 03:50 PM
|
#3
|
Senior Member
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284
Rep:
|
You need to be looking at NAT (network address translation) to masquerade your requests. The Linux box with your ADSL modem on needs iptable rules setting up, so anything coming in from your Windows box is sent out from your Linux machine, and data returned from the Internet is correctly sent back to Windows. Are some easy tutorials on nat + masquearding with iptables if you do a quick search - there's problem something under the 'Answers' section on here.
|
|
|
10-23-2005, 03:59 PM
|
#4
|
LQ Newbie
Registered: Oct 2005
Location: Toronto
Distribution: Red Hat 8.0
Posts: 26
Rep:
|
How many network cards have you installed on your linux machine? I think you need 2. One is connected with your Windows machine, and the other with Internet. If NAT is complex for you, you can use "squid" as a proxy server.
Post your result of "ifconfig" and "route" here, these might help me to find out the problem.
|
|
|
10-23-2005, 04:03 PM
|
#5
|
Member
Registered: Sep 2005
Posts: 58
Original Poster
Rep:
|
In Yast2 in the Masquerade settings it says i need 2 components in order to set it up... e.g. a Modem and a Lan card... my Lan card is in the list but my modem isnt. i dont see why, i used eciadsl to install the modem and it works fine somehow i gotta get that device into the Device list in the firewall settings.
|
|
|
10-23-2005, 04:17 PM
|
#6
|
Moderator
Registered: Aug 2002
Posts: 26,757
|
ppp0 is the device that connects to the internet. Is it listed in the device list?
For manually configuring internet connection sharing.
# iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
# echo 1 > /proc/sys/net/ipv4/ip_forward
|
|
|
10-23-2005, 04:20 PM
|
#7
|
Member
Registered: Sep 2005
Posts: 58
Original Poster
Rep:
|
Route:
Code:
Simon:/usr/local/bin # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
rasj3nrp5.ilfor * 255.255.255.255 UH 0 0 0 ppp0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default * 0.0.0.0 U 0 0 0 ppp0
default Simon.Rigby 0.0.0.0 UG 0 0 0 eth0
IFCONFIG:
Code:
Simon:/usr/local/bin # ifconfig
eth0 Link encap:Ethernet HWaddr 00:30:05:70:5A:18
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::230:5ff:fe70:5a18/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:25 errors:0 dropped:0 overruns:0 frame:0
TX packets:879 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3116 (3.0 Kb) TX bytes:67364 (65.7 Kb)
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:560 errors:0 dropped:0 overruns:0 frame:0
TX packets:560 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:47954 (46.8 Kb) TX bytes:47954 (46.8 Kb)
ppp0 Link encap:Point-to-Point Protocol
inet addr:217.42.180.254 P-t-P:217.47.124.148 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:750 errors:0 dropped:0 overruns:0 frame:0
TX packets:798 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:374852 (366.0 Kb) TX bytes:106283 (103.7 Kb)
Which device list are you talking about?
|
|
|
10-23-2005, 05:51 PM
|
#8
|
Moderator
Registered: Aug 2002
Posts: 26,757
|
Quote:
Which device list are you talking about?
|
ppp0 being in the firewall settings device list.
|
|
|
10-24-2005, 04:06 AM
|
#9
|
Member
Registered: Sep 2005
Posts: 58
Original Poster
Rep:
|
No the ppp0 isnt in the firewall device list thats the problem :S If it was i think i could know how to do it.
|
|
|
10-27-2005, 09:18 PM
|
#10
|
Moderator
Registered: Aug 2002
Posts: 26,757
|
Not familar enough with yast2 to help.
|
|
|
10-28-2005, 04:27 AM
|
#11
|
Member
Registered: Sep 2005
Posts: 58
Original Poster
Rep:
|
But its ok to spam
I dont know the rules but normally if you cant help out dont say anything.
|
|
|
10-28-2005, 08:20 PM
|
#12
|
LQ Newbie
Registered: Oct 2005
Location: Toronto
Distribution: Red Hat 8.0
Posts: 26
Rep:
|
In your Windows PC, did you setup the DNS address of your ISP?
Can Windows PC ping any Internet IPs and get replies? If yes, that means the Linux PC is sharing the Internet connection. The cause is the DNS address setting in the Windows PC.
In Windows PC, the setting should be:
IP: 192.168.0.2
Mask: 255.255.255.0
GW: 192.168.0.1
DNS: the DNS addrsss of your ISP
And if the Linux PC's IP forwarding is working fine, the Windows PC should have access to Internet. This is how my home network works.
If these don't work, I have the second solution, run squid in the Linux PC, in Windows PC's Internet browser, set proxy like this: 192.168.0.1 port 3128. This definitely works, but you need to setup something in squid.conf. If you don't know how, just say.
Last edited by wym; 10-28-2005 at 08:33 PM.
|
|
|
10-29-2005, 05:06 AM
|
#13
|
Member
Registered: Sep 2005
Posts: 58
Original Poster
Rep:
|
Got it all working great now
Thank you
|
|
|
All times are GMT -5. The time now is 10:06 AM.
|
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
|
|