LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-23-2001, 08:53 AM   #1
GnomeKing
LQ Newbie
 
Registered: Sep 2001
Posts: 12

Rep: Reputation: 0
Natting errors (iptables)....


NATing error: IN= OUT=eth1 SRC=<my external IP> DST=194.117.194.68 LEN=67 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP SPT=53 DPT=53 LEN=47
NATing error: IN= OUT=eth1 SRC=<my external IP> DST=136.248.100.11 LEN=67 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP SPT=53 DPT=53 LEN=47
NATing error: IN= OUT=eth1 SRC=<my external IP> DST=194.117.194.68 LEN=67 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP SPT=53 DPT=53 LEN=47
NATing error: IN= OUT=eth1 SRC=<my external IP> DST=136.248.100.11 LEN=67 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP SPT=53 DPT=53 LEN=47
NATing error: IN= OUT=eth1 SRC=<my external IP> DST=194.168.4.100 LEN=70 TOS=0x00 PREC=0x00 TTL=64 ID=3901 DF PROTO=UDP SPT=1047 DPT=53 LEN=50

obviously something to do with DNS.....

the rule in iptables that causes that message is....

echo "Enableing Masquradeing"
# just for the LAN to external
$IPTABLES -t nat -A POSTROUTING -s $LAN_NET -d $ANY -j MASQUERADE
$IPTABLES -t nat -A POSTROUTING -j LOG --log-prefix "NATing error: "

(where $LAN_NET == 192.168.1.0/255.255.255.0 and $ANY = 0.0.0.0/0.0.0.0)

the question is....
should I be worried about this?
should I allow natting to occur from my external IP to the rest of the world?
and if so, can I specify the rules so they DONT rely on my external ip addy?

Thanks for the help,

Bob
 
Old 09-23-2001, 09:34 AM   #2
Griffon26
Member
 
Registered: Sep 2001
Location: The Netherlands
Distribution: Gentoo, Debian, Mandrake, LFS
Posts: 182

Rep: Reputation: 30
Re: Natting errors (iptables)....

Quote:
Originally posted by GnomeKing


the question is....



should I be worried about this?


should I allow natting to occur from my external IP to the rest of the world?

NAT is only done if you specify rules for it and if the translation specified in the first rule is all you need, why would you want to have another rule matching the rest?


I'd just leave it out.



By the way, remember that the second rule catches the following:
Internet -> firewall
firewall -> Internet
Internet -> LAN

Might be wrong about this though

Last edited by Griffon26; 09-23-2001 at 09:39 AM.
 
Old 09-23-2001, 09:48 AM   #3
GnomeKing
LQ Newbie
 
Registered: Sep 2001
Posts: 12

Original Poster
Rep: Reputation: 0
Re: Re: Natting errors (iptables)....

Quote:
Originally posted by Griffon26

NAT is only done if you specify rules for it and if the translation specified in the first rule is all you need, why would you want to have another rule matching the rest?
I'd just leave it out.
I appreciate that... I'm just wondering why iptables is wanting to NAT stuff from my external IP to the net... (dns stuff in this case but it has been other ports...)
or does it send everything that goes through the router to the nat table?

if so, should I explicitly drop the packets from my external IP address in the natting table?
 
Old 09-23-2001, 09:53 AM   #4
GnomeKing
LQ Newbie
 
Registered: Sep 2001
Posts: 12

Original Poster
Rep: Reputation: 0
Re: Re: Natting errors (iptables)....

Quote:
Originally posted by Griffon26

By the way, remember that the second rule catches the following:
Internet -> firewall
firewall -> Internet
Internet -> LAN
uhhhh.... the only matches I've seen in dmesg is ext IP -> internet...

why would internet -> firewall/lan pass through the natting table?....

<-- n00b btw, if u hadnt guessed :P
 
Old 09-23-2001, 10:58 AM   #5
Griffon26
Member
 
Registered: Sep 2001
Location: The Netherlands
Distribution: Gentoo, Debian, Mandrake, LFS
Posts: 182

Rep: Reputation: 30
Re: Re: Re: Natting errors (iptables)....

Quote:
Originally posted by GnomeKing
















<-- n00b btw, if u hadnt guessed :P






Same here I guess. I have been working with iptables for the past few days.









Quote:
uhhhh.... the only matches I've seen in dmesg is ext IP -> internet...







I gave it some more thought and I think it's like this:







LAN<->internet: PREROUTING(nat)->FORWARD(filter)->POSTROUTING(nat)

LAN/internet->firewall: PREROUTING(nat)->INPUT(filter)

firewall->LAN/internet: OUTPUT(nat)->OUTPUT(filter)->POSTROUTING(nat)



Quote:
why would internet -> firewall/lan pass through the natting table?....
Everything being sent goes through NAT (before or after routing or even both).



So my earlier remark was wrong.

The second rule catches internet->LAN, firewall->LAN and firewall->internet.



I hope I got this right. Is there anybody who can confirm this?

Last edited by Griffon26; 09-23-2001 at 11:11 AM.
 
  


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
kernel 2.6.7 + iptables 1.2.x ... compile errors meks Linux - General 0 06-23-2004 02:33 PM
network errors maybe by iptables ethernet Linux - Networking 0 02-17-2004 04:34 PM
Natting suvajit Linux - Software 1 05-15-2003 05:50 AM
iptables & Masquerading errors vk1985 Linux - Networking 2 03-16-2003 10:06 PM
iptables errors since upgrading to RH 8.0 pdibona Linux - Networking 2 02-17-2003 08:53 AM

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

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