🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.comp.os.linux
Article #14328

Re: DNAT �� SNAT ����

#14328
From: jkwoocn
Date: Tue, 11 Sep 2001 05:28
57 lines
3481 bytes
������A��IPΪ192.168.1.1

���ڲ���--destination-port�е�destinationָ��������A����Router2��������B?

ʹ������������������
    iptables -A PREROUTING -t nat  -i eth0  -s 192.168.1.1  -d 128.1.1.2 \
             -p tcp --dport 23 -j DNAT --to 128.2.2.3



"madog" <no@no.no> wrote in message news:9nk07i$l63$1@madogcc.myip.org...
> ������� "--sport 23" ��
> ����������IPTABLES�Ļ������Ӧ����ROUTER2ֻ��A������23�������Լ�23������ת
ȥ
> B
>
> ����A��ROUTER2 ������TELNET����һ����
> A������1024������һ���˿�--->router2:23
>
> �?128.1.1.1&128.1.1.2��ͬ�εģ��м���ô���и�ROUTER1����ʲô���õģ�
>
> ��Ҳ��̫����˵���˱����
>
>
> --
> http://madogcc.myip.org  news://madogcc.myip.org
>
> "jkwoocn" <jkwoocn@yahoo.com> wrote in message
> news:9njuf6$q9b$1@mail.cn99.com...
> > ����,���繹������
> >
> >   ______             _______             _______            ______
> >   |     |           (       )           (       )          |      |
> >   |����A|-----------(Router 1)----------(Router2)----------|����B |
> >   |_____|           (_______)        eth0(___)eth1         |_____ |
> >   192.168.1.1                      128.1.1.2    128.2.2.2    128.2.2.3
> >
> > ����,����B�ܹ�ͨ������·�ɷ�������A,������Aֻ��ͨ��һ��·�ɷ��ʵ�
Router2,
> ��
> > ����Ϊ��ȫ���趨��
> >
> > ��Ϊ����������A��ijһ�˿��ܷ�������B, ��Router2����DNAT,��:
> >
> >     iptables -A PREROUTING -t nat  -i eth0  -s 128.1.1.1  -d 128.1.1.2 \
> >              -p tcp --sport 23 --dport 23 -j DNAT --to 128.2.2.3
> >
> > ����,����A��Ȼ����������B��ͨ��,��������Ϊʲô?�Ƿ��ʱ����B��������A
ʱ,
> ��
> > ��ֱ����ԭ�е�·��,��Ӧ��Router2�������һ��SNAT����MASQUERADE?
> >
> >
> >
> >
>
>
Technical Details
Message-ID: <9nk7a9$35s$1@mail.cn99.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!62.112.0.25!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!news.cn99.com!not-for-mail
References: <9njuf6$q9b$1@mail.cn99.com> <9nk07i$l63$1@madogcc.myip.org>

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: 10b277,4fc98b59a1330052
X-Google-Attributes: gid10b277,public
X-Google-ArrivalTime: 2001-09-10 22:26:36 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!62.112.0.25!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!news.cn99.com!not-for-mail
From: "jkwoocn" <jkwoocn@yahoo.com>
Newsgroups: cn.comp.os.linux
Subject: Re: DNAT �� SNAT ����
Date: Tue, 11 Sep 2001 13:28:25 +0800
Organization: Bentium Ltd. (CN99)
Lines: 59
Message-ID: <9nk7a9$35s$1@mail.cn99.com>
References: <9njuf6$q9b$1@mail.cn99.com> <9nk07i$l63$1@madogcc.myip.org>
NNTP-Posting-Host: 61.170.136.115
X-Trace: mail.cn99.com 1000185994 3260 61.170.136.115 (11 Sep 2001 05:26:34 GMT)
X-Complaints-To: usenet@news.cn99.com
NNTP-Posting-Date: Tue, 11 Sep 2001 05:26:34 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600