Article View: comp.os.linux.networking
Article #395Re: IPTables vs. DNS (or : iptables doesn't change sourceport when MASQ'ing)
From: Koen Van de Velde
Date: Mon, 06 Jan 2003 12:02
Date: Mon, 06 Jan 2003 12:02
35 lines
2493 bytes
2493 bytes
On Mon, 06 Jan 2003 10:12:13 +0000, John Armstrong
<ja@ggrove.swinternet.co.uk> wrote:
>On Fri, 03 Jan 2003 17:06:20 GMT, nospam.koen.vdvelde@advalvas.be
>(Koen Van de Velde) wrote:
>
>>On Fri, 03 Jan 2003 16:32:23 +0000, John Armstrong
>><ja@ggrove.swinternet.co.uk> wrote:
>>
>
>>>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.
>>I think this one is more used for redirection. eg: incomming packets
>>on port 8000 on external interface of router should be redirected to
>>other internal machine on port 80 (then the --to-ports 80 should be
>>used). As described in 6.2.1 of the NAT-howto.
>
>That would be the --to-ports option of the REDIRECT target, which
>gives a range of destination ports, while the --to-ports option of
>MASQUERADE gives a range of source ports.
>--
>John
Hi John,
I changed my masq-lines to :
/sbin/iptables -t nat -A POSTROUTING -s 192.168.102.13 -p udp \
--sport 53 -o $EXTDEV -j MASQUERADE --to-port 61000:65095
/sbin/iptables -A POSTROUTING -t nat -o $EXTDEV -j MASQUERADE
and this works fine now !
thanks for your assistance,
Koen.
Technical Details
Message-ID:
<3e196fa3.14080897@News.CIS.DFN.DE>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.online.be!fu-berlin.de!uni-berlin.de!d5761f24.kabel.telenet.BE!not-for-mailReferences:
<3e15b63e.2079245577@News.CIS.DFN.DE> <kceb1vkrt1c2c1hl5gmnadtsjtlq1mlmqu@4ax.com> <3e15c063.2081842881@News.CIS.DFN.DE> <mgli1vspehv391afnbeb08gdlenta1ucq9@4ax.com>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: 102510,1167933813471c51 X-Google-Attributes: gid102510,public X-Google-Thread: 10669a,1167933813471c51 X-Google-Attributes: gid10669a,public X-Google-ArrivalTime: 2003-01-06 04:03:24 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.online.be!fu-berlin.de!uni-berlin.de!d5761f24.kabel.telenet.BE!not-for-mail From: nospam.koen.vdvelde@advalvas.be (Koen Van de Velde) 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: Mon, 06 Jan 2003 12:02:56 GMT Lines: 35 Message-ID: <3e196fa3.14080897@News.CIS.DFN.DE> References: <3e15b63e.2079245577@News.CIS.DFN.DE> <kceb1vkrt1c2c1hl5gmnadtsjtlq1mlmqu@4ax.com> <3e15c063.2081842881@News.CIS.DFN.DE> <mgli1vspehv391afnbeb08gdlenta1ucq9@4ax.com> NNTP-Posting-Host: d5761f24.kabel.telenet.be (213.118.31.36) X-Trace: fu-berlin.de 1041854599 14771898 213.118.31.36 (16 [84932]) X-Newsreader: Forte Free Agent 1.11/32.235