LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-01-2005, 11:43 PM   #1
fjg1973
LQ Newbie
 
Registered: Dec 2004
Posts: 3

Rep: Reputation: 0
Unhappy ubale to nat under FC3


Hi
I just got a new laptop and set up a small lan, my primary PC which is connected to the internet has two nic cards, one is conected to the DSL and the other one is connected to the LAN I just setup

My laptop ip is: 10.1.1.2 netmask 255.255.255.0
MY PC IP is: 10.1.1.1 netmask 255.255.255.0, it also has the ppp0 connected to the internet.
All the net filter modules are loaded into the kernel
ipt_MASQUERADE 4224 1
iptable_nat 25668 2 ipt_MASQUERADE
ipt_REJECT 7168 0
ipt_state 2176 0
ip_conntrack 45108 3 ipt_MASQUERADE,iptable_nat,ipt_state
iptable_filter 3200 1
ip_tables 18304 5 ipt_MASQUERADE,iptable_nat,ipt_REJECT,ipt_state,iptable_filter

When I want to give my laptop access to the internet this is what I do:

1) iptables -A POSTROUTING -t nat -o ppp0 -j MASQUERADE
2) echo 1 > /proc/sys/net/ipv4/ip_forward

My PC kernel is 2.6.9 and the latptop kernel is 2.6.10

When I try to ping any IP address from my laptop I do not receive any reply
I tried pinging my ISP DNS, yahoo, etc. But I don't reach anything..
Am I missing something?
Thanks
 
Old 01-02-2005, 02:09 AM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Try adding a rule to allow traffic on the forwarding chain:

iptables -I FORWARD -j ACCEPT

Note that this is a temporary rule that for testing purposes that will open up the entire LAN to outside traffic and should be removed afterwards. If that doesn't work, try posting your entire firewall script (or output of iptables -vnL and iptables -t nat -vnL). Also you haven't said whether the laptop can ping the internal LAN interface (10.10.1.1). I'm also assuming that you've connected the laptop to the linux box with a crossover-cable (not standard ethernet patch cable) or through a hub/switch?
 
Old 01-02-2005, 09:22 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
Futhermore,
The gateway of the laptop should be the IP address of the PC i.e. 10.1.1.1. If you configured the laptop with a static IP address you will need to add the DNS info to the /etc/resolv.conf file just like the PCs.
 
Old 01-02-2005, 12:43 PM   #4
fjg1973
LQ Newbie
 
Registered: Dec 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you!
I just figured out waht it was.... When I initially installed the fedora core 3, I enabled the firewall on the installation screen.

So i just used the setup command and I customized it, by allowing the traffic thru eth0, eth1 and ppp0
Thanks for your help
Regards
 
  


Reply



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
DISCUSSION: DMA with FC3 on a GA-8TRS350MT motherboard with a custom 2.6.12 kernel - FC3 DVD playbac rylan76 LinuxAnswers Discussion 0 08-21-2005 05:18 PM
(FC3) ATI FGLRX Drivers work for months,FC3 update, stop working genixpro Linux - Hardware 2 04-23-2005 09:01 PM
I configure NAT and use "services ..." to save it but when I reboot there is no nat bruack Linux - Software 4 09-01-2004 02:38 AM
Susefirewall2 Nat Problem / nat 1:1 trubi Linux - Distributions 0 07-20-2004 05:50 AM
What's the difference between Linux-NAT and Sygate-NAT? yuzuohong Linux - Networking 0 08-07-2002 04:07 AM

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

All times are GMT -5. The time now is 02:31 PM.

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