Linux - NetworkingThis 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.
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.
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:
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
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.