LinuxQuestions.org
Visit Jeremy's Blog.
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
 
LinkBack Search this Thread
Old 06-25-2002, 07:49 PM   #1
guanyu
Member
 
Registered: Jul 2001
Distribution: RedHat 7.0,7.1,7.2,7.3,8.0. Sun Solaris
Posts: 111

Rep: Reputation: 15
RH 7.3 NAT problem


Hey guys, I got the problem with RH7.3 NAT. I setup adn configure it according to http://www.e-infomax.com/ipmasq/
Well, everything seems fine. My firewall2.4 up and running. My dhcpd is up when boot the system. But the problem is my clients couldn't access internet. Both clients can ping each other and the server. And the server can ping both of the client. Here is my dhcpd.conf

subnet 192.168.1.2 subnetmask 255.255.255.0{
range 192.168.1.2 192.168.1.60;
default-lease-time 86400;
max -lease-time 86400;
option routers 192.168.1.1;
option ip_forwarding off;
option broadcast_address 192.168.1.255;
option subnet-mask 255.255.255.0;}

Here is my routing table

Destination Gateway Genmask Interface
255.255.255.255 0.0.0.0 255.255.255.255 eth1
68.2.154.0 0.0.0.0 255.255.255.0 eth0
192.168.1.0 0.0.0.0 255.255.0.0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 lo
0.0.0.0 68.2.154.1 0.0.0.0 eth0
I have disable ipchains. Do you guys have any idea ? Thank !!!


Regards,
Guan
 
Old 06-25-2002, 08:51 PM   #2
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,153

Rep: Reputation: 56
your problem looks like it could be dns

did you set it up manually?

can you connect to an ip address?

I use this line in my dhcpd.conf

option domain-name-servers 192.168.0.1, 192.168.1.1;
 
Old 06-25-2002, 09:18 PM   #3
guanyu
Member
 
Registered: Jul 2001
Distribution: RedHat 7.0,7.1,7.2,7.3,8.0. Sun Solaris
Posts: 111

Original Poster
Rep: Reputation: 15
DavidPhillips,
Yes I did. But it didn't work. I am little bit confused.
My client(XP) Default gateway is 192.168.1.1
ip is 192.168.1.3

My XP(netstat -rn)
Destination Netmask GateWay Interface
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.3
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1
192.168.1.0 255.255.255.0 192.168.1.3 192.168.1.3
192.168.1.3 255.255.255.255 127.0.0.1 127.0.0.1
192.168.1.255 255.255.255.255 192.168.1.3 192.168.1.3
224.0.0.0 224.0.0.0 192.168.1.3 192.168.1.3
255.255.255.255 255.255.255.255 192.168.1.3 192.168.1.3

Default gateway 192.168.1.1

One more thing, when i view my xp LAN status, it point to my ISP DNS instead of local dns. It should be routing problem rite philip? any idea about that?.....Thanks
 
Old 06-25-2002, 10:22 PM   #4
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,153

Rep: Reputation: 56
we may need to see your iptables rules

how about cat /proc/sys/net/ipv4/ip_forward


is it showing a 1
 
Old 06-26-2002, 01:42 PM   #5
guanyu
Member
 
Registered: Jul 2001
Distribution: RedHat 7.0,7.1,7.2,7.3,8.0. Sun Solaris
Posts: 111

Original Poster
Rep: Reputation: 15
Phillip,
/proc/sys/net/ipv4/ip_forward
Yeap it is 1
 
Old 06-27-2002, 06:07 PM   #6
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,153

Rep: Reputation: 56
maybe the dns is blocked by a firewall. You said the client is using the dns from the isp. Maybe these are blocked.
 
Old 06-27-2002, 06:09 PM   #7
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,153

Rep: Reputation: 56
I am using named on my linux box


my dhcpd has this for setting the dns on clients

option domain-name-servers 192.168.0.1, 192.168.1.1;
 
Old 06-29-2002, 02:59 PM   #8
guanyu
Member
 
Registered: Jul 2001
Distribution: RedHat 7.0,7.1,7.2,7.3,8.0. Sun Solaris
Posts: 111

Original Poster
Rep: Reputation: 15
David,
Do I need to download netfilter? I setup RH7.2 before. I do need to patch it. I am not sure about RH7.3. Thanx
 
Old 06-29-2002, 03:58 PM   #9
guanyu
Member
 
Registered: Jul 2001
Distribution: RedHat 7.0,7.1,7.2,7.3,8.0. Sun Solaris
Posts: 111

Original Poster
Rep: Reputation: 15
David,
My internet is working. But only MSN and Kazaa(clients). My clients Internet Explorer are not working. I don't know what is going on with that? do you have any idea?
 
Old 06-30-2002, 11:51 AM   #10
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,153

Rep: Reputation: 56
Normally all you do is set the rules for iptables or ipchains, I have never had to patch anything.


Are you using dhcp?

How is it setup?


What's your rules look like?
 
Old 07-01-2002, 04:37 AM   #11
guanyu
Member
 
Registered: Jul 2001
Distribution: RedHat 7.0,7.1,7.2,7.3,8.0. Sun Solaris
Posts: 111

Original Poster
Rep: Reputation: 15
David,
RH 7.3 is slightly diff. It came with iptables. It doesn't need to patch it. All you need follow the instructions from http://www.e-infomax.com/ipmasq/ and download the firewall script. Do remember change the vi firewall-2.4
IPTABLES =/sbin/iptables(RH7.3)
** If you patch the iptable(most probably older RH version), you need to path to the iptables directory. Do remember to disable ipchains.

Here is my Dhcpd.conf( /etc/dhcpd.conf)
subnet 192.168.1.2 subnetmask 255.255.255.0{
range 192.168.1.2 192.168.1.60;
default-lease-time 86400;
max -lease-time 86400;
option routers 192.168.1.1;
option ip_forwarding off;
option broadcast_address 192.168.1.255;
option subnet-mask 255.255.255.0;}
option domain-name-servers xxx.xx.xxx.xx,xx.xxx.xx.xx}
(xxx.xxx.xxx.xx ISP domain name server) * If you are not sure, under your /etc/resolv.conf

Firewall rules, you can get it here http://www.e-infomax.com/ipmasq/

Well, RH 7.3 much more easy to setup NAT instead RH 7.2. Have a nice day


guanyu
 
Old 07-01-2002, 08:27 PM   #12
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,153

Rep: Reputation: 56
Cool


Sounds like you have it working now.


By the way I setup my firewall rules the same way on RH 7.1, 7.2, and 7.3



 
Old 07-02-2002, 04:47 AM   #13
guanyu
Member
 
Registered: Jul 2001
Distribution: RedHat 7.0,7.1,7.2,7.3,8.0. Sun Solaris
Posts: 111

Original Poster
Rep: Reputation: 15
David,
It's working now. What if I wanna to block my client 192.168.1.6 internet access. Can I do that? How? Thank you have a nice day.


Mun
 
Old 07-02-2002, 05:52 AM   #14
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,153

Rep: Reputation: 56
something like this should work


iptables -A INPUT -s 192.168.1.6/32 -d 0.0.0.0/0 -p all -j DROP

if you just want to block http on port 80 use -p 80

Last edited by DavidPhillips; 07-02-2002 at 06:10 AM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NAT problem akmon Linux - Networking 1 11-10-2005 11:00 AM
Susefirewall2 Nat Problem / nat 1:1 trubi Linux - Distributions 0 07-20-2004 05:50 AM
NAT problem Obscure Linux - Networking 1 03-05-2004 07:06 AM
NAT problem Comatose51 Linux - Networking 1 06-23-2003 10:41 PM
What's the difference between Linux-NAT and Sygate-NAT? yuzuohong Linux - Networking 0 08-07-2002 04:07 AM


All times are GMT -5. The time now is 10:13 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration