🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.linux.networking
Article #399

Re: IPTables vs. DNS (or : iptables doesn't change sourceport when MASQ'ing)

#399
From: John Armstrong
Date: Fri, 03 Jan 2003 16:32
47 lines
3081 bytes
On Fri, 03 Jan 2003 16:17:39 GMT, nospam.koen.vdvelde@advalvas.be
(Koen Van de Velde) wrote:

>Hi,
>
>Since I converted my ipchains-rules to iptables, my local DNS-server
>doesn't work anymore.
>
snip

>As you can see : on the external interface, the IP-address is MASQ'ed,
>but the port NOT !! This is the reason why we don't get any answer
>back on these requests, because our provider does block incomming
>trafic for port 53. And therefor the local dns-server keeps sending
>requests to the different internet dns-servers hoping it will ever get
>an answer.

Assuming bind is being used, has /etc/named.conf been altered? My copy
has the following comment:
         * Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
        // query-source address * port 53;

>
>IN SHORT : 
>Why doesn't the MASQ-module of iptables translate the portnumber when
>it's MASQ'ing (and ipchains did !) ??
man iptables :
 --to-ports port[-port]
  This  specifies  a  range of source ports to use, overriding the
  default SNAT source port-selection heuristics (see above).  This
  is only valid if the rule also specifies -p tcp or -p udp.


>First I thought it wasn't doing this for DNS-request only, but taking
>a closer look, it doesn't do this for any service.
>So if two computers in my LAN start an http-request from their local
>port 1026, my linux-router/firewall will sent them both out with the
>same source-port.  I'm wondering what kind of effect this wil have !
Not an expert, but presumably the de-masq'ing process sorts it out and
sends the reply packets back where they should go. Not sure how it
would work if both requests were going the the same destination
though.
-- 
John
Technical Details
Message-ID: <kceb1vkrt1c2c1hl5gmnadtsjtlq1mlmqu@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!peer1.news.newnet.co.uk!zen.net.uk!lovejoy.zen.co.uk.POSTED!not-for-mail
References: <3e15b63e.2079245577@News.CIS.DFN.DE>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 100a19,1167933813471c51
X-Google-Attributes: gid100a19,public
X-Google-Thread: 10669a,1167933813471c51
X-Google-Attributes: gid10669a,public
X-Google-Thread: 102510,1167933813471c51
X-Google-Attributes: gid102510,public
X-Google-ArrivalTime: 2003-01-03 08:32:42 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!peer1.news.newnet.co.uk!zen.net.uk!lovejoy.zen.co.uk.POSTED!not-for-mail
From: John Armstrong <ja@ggrove.swinternet.co.uk>
Newsgroups: comp.os.linux.networking,nl.comp.os.linux.netwerken,be.comp.os.linux
Subject: Re: IPTables vs. DNS (or : iptables doesn't change sourceport when MASQ'ing)
Date: Fri, 03 Jan 2003 16:32:23 +0000
Message-ID: <kceb1vkrt1c2c1hl5gmnadtsjtlq1mlmqu@4ax.com>
References: <3e15b63e.2079245577@News.CIS.DFN.DE>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 47
Organization: Zen Internet
NNTP-Posting-Host: 212.23.14.155
X-Trace: 1041611562 lovejoy.zen.co.uk 29927 212.23.14.155
X-Complaints-To: abuse@zen.co.uk