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 06-04-2005, 01:59 PM   #1
iamtux
LQ Newbie
 
Registered: Apr 2005
Posts: 9

Rep: Reputation: 0
iptables : masquerading not possible


Hi,
I have an ethernet internet connection. I wish to share this with a laptop. I have 2 NICs on the server and have connected to the laptop through a crossover cable connection. The specs are:

host
internet
eth0: 192.168.11.x
gateway : 192.168.11.1

eth1
192.168.0.1
gateway: none

Laptop
eth0: 192.168.0.2
gateway: 192.168.0.1

Both comps have WinXP/FC3 dual boot. This setting works fine when the server is in windows and the laptop in linux/windows. However when the server is in linux, though two-way ping is possible and Samba, NFS file sharing also works, Internet access is not possible from the laptop. The problem seems to be with iptables. IP Masquerading does not seem to work though i added the rules ip_forward = 1and enabled POSTROUTING. I tried using firestarter, however that too doesn't work. Does it have anything to do with recompiling the kernel? Also i cannot run iptables other than as root. Does that have something to do with this?
Please do help.
Vish
 
Old 06-04-2005, 02:39 PM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
what do u get for runing

traceroute <ip of any internet website>

regards
 
Old 06-04-2005, 04:39 PM   #3
iamtux
LQ Newbie
 
Registered: Apr 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Hurray
Got it after 4 months
Thanks masand. I did a step by step traceroute after adding every single rule in iptables after an
$ /sbin/iptables -F
$ /sbin/iptables -t nat -F

It appears that i had not entered the DNS servers properly on the laptop. So all these days i have been having connectivity but DNS was the problem.
Thanks a million
Vish
 
Old 06-04-2005, 11:32 PM   #4
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
gr8 that it helped!!
 
  


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
squid and iptables masquerading egyptian Linux - Security 1 09-05-2004 04:31 AM
iptables MASQUERADING at boot krishanprath Linux - Newbie 2 09-30-2003 07:41 AM
IP Masquerading (with iptables) and Planetside Milkman00 Linux - Networking 4 06-06-2003 09:12 AM
Iptables Masquerading GOLDF1NG3R Linux - Security 3 11-10-2001 11:51 PM
Iptables Masquerading GOLDF1NG3R Linux - Networking 4 11-01-2001 04:34 AM

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

All times are GMT -5. The time now is 12:24 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