LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-29-2005, 09:32 AM   #1
akhil_raj27
LQ Newbie
 
Registered: Sep 2005
Location: mysore
Posts: 6

Rep: Reputation: 0
home networking in fedora


hi

I want to connect two systems working on linux OS only to internet. distribution using is fedora 3. can any 1 help me in this regard. i'm using a dial up connection.


thank u.
 
Old 09-29-2005, 01:16 PM   #2
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
Do you have dialup working on system A, and system B connected to system A by ethernet?

Last edited by Snowbat; 09-29-2005 at 01:18 PM.
 
Old 09-30-2005, 10:12 AM   #3
akhil_raj27
LQ Newbie
 
Registered: Sep 2005
Location: mysore
Posts: 6

Original Poster
Rep: Reputation: 0
thanks for the reply,

Actually what i have done is i had already assigned
IP address of PC A as 192.168.10.1 and that of PC B as 192.168.10.2.
If i give 'ping 192.168.10.2' from A, it responds correctly.
I have internet connected to PC A, but not to PC B.
I want to access internet in PC B through PC A.
Help me please.
 
Old 09-30-2005, 11:11 AM   #4
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
Assuming your internet connection is ppp0, run the following commands on PC A:
Code:
/sbin/modprobe iptable_nat
/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
For name resolution you'll need to copy your ISP nameserver details from /etc/resolv.conf on PC A to /etc/resolv.conf on PC B. You should also run /sbin/route on PC B and check that your default route is set to 192.168.10.1. If not, run this:
Code:
/sbin/route add default gw 192.168.10.1

Last edited by Snowbat; 09-30-2005 at 11:14 AM.
 
Old 10-01-2005, 07:33 AM   #5
akhil_raj27
LQ Newbie
 
Registered: Sep 2005
Location: mysore
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the reply.

All commands went on nicely.
Even then i couldn't been able to connect to the internet from B through A.
This is the result of
Code:
cat /sbin/route
in PC B.

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0


Result of
Code:
ifconfig
in PC A is given below.

eth0 Link encap:Ethernet HWaddr 00:20:ED:0F:06:12
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:440 errors:0 dropped:0 overruns:0 frame:0
TX packets:450 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:38957 (38.0 KiB) TX bytes:50089 (48.9 KiB)
Interrupt:11 Base address:0xc000

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:4002 errors:0 dropped:0 overruns:0 frame:0
TX packets:4002 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3399163 (3.2 MiB) TX bytes:3399163 (3.2 MiB)

ppp0 Link encap:Point-to-Point Protocol
inet addr:219.64.186.118 P-t-P:172.23.128.82 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1400 Metric:1
RX packets:1776 errors:2 dropped:0 overruns:0 frame:0
TX packets:2158 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:903632 (882.4 KiB) TX bytes:259117 (253.0 KiB)

Help me please..................
 
Old 10-01-2005, 09:05 PM   #6
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
I see you've moved PC A eth0 to 192.168.0.1. Have you also moved PC B eth0 to 192.168.0.2? If PC B is still at 192.168.10.2, it's not gonna work (well it could if you change netmasks on both but let's not go there)
 
Old 10-02-2005, 01:07 AM   #7
akhil_raj27
LQ Newbie
 
Registered: Sep 2005
Location: mysore
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks.
yes, i have changed PC B ip address to 192.168.0.2.
and PC A address is 192.168.0.1.
What to do?.
 
Old 10-02-2005, 06:18 AM   #8
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
When the dialup connection is established on PC A, run the following on PC B and tell me what you see:
Code:
 /usr/sbin/traceroute 68.142.197.85
(Your traceroute program may be located in a different directory or not installed yet. - if you get bash: /usr/sbin/traceroute: command not found modify path or install it)
 
Old 10-03-2005, 01:30 AM   #9
akhil_raj27
LQ Newbie
 
Registered: Sep 2005
Location: mysore
Posts: 6

Original Poster
Rep: Reputation: 0
This is the result

Code:
[root@nayan ~]# /usr/sbin/traceroute 68.142.197.85
traceroute to 68.142.197.85 (68.142.197.85), 30 hops max, 38 byte packets
 1  192.168.0.2 (192.168.0.2)  2594.128 ms !H  3000.358 ms !H  3000.380 ms !H
 
Old 10-03-2005, 05:23 PM   #10
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
!H means an ICMP message was received (presumably from PC A) indicating "Host Unreachable. The router has no route to the target system."

Did you remember run these commands on PC A after establishing the dialup connection?
Code:
/sbin/modprobe iptable_nat
/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
 
Old 10-04-2005, 07:45 AM   #11
nayankk
LQ Newbie
 
Registered: Mar 2005
Location: Mysore
Distribution: Madrake, PCQLinux
Posts: 10

Rep: Reputation: 0
yes i have done that
 
Old 10-04-2005, 10:39 AM   #12
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
Are there any firewall rules on PC A or PC B that would block this NAT connection?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
home networking help jeopardyracing Linux - Newbie 3 09-26-2003 04:44 PM
home networking help exec Linux - Networking 9 02-16-2003 04:19 PM
Home Networking jwithers1 Linux - Networking 1 08-06-2002 11:52 AM
Home Networking salman Linux - Networking 5 01-15-2002 08:51 PM
Home networking knightmare2279 Linux - Networking 8 11-25-2001 12:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration