🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: DNAT �� SNAT ����

#14333
From: madog
Date: Tue, 11 Sep 2001 09:29
122 lines
5933 bytes
"jkwoocn" <jkwoocn@yahoo.com> wrote in message
news:9nkgq2$99k$1@mail.cn99.com...
> ʵ�������Router2�Ҳ��õ�linux�汾��Astaro Security Linux 1.811 ,���е���
��
> ������WEB������е�.����B����һTelnet Server,����Router2ʹ����A�ܷ���B,��A
��
> ��B��Telnet Serverʱ,���ܾ�.���Կ϶�����B�ϵ�Ȩ������,Ҳ������������.ǰ��
˵
> ��ֻ��һ������,�ؼ�������֪��DNAT��SNAT�Dz������Ӧ��,����DNAT�Dz��Ǿͱ���
ͬ
> ʱҲҪ����Ӧ��SNAT

����������ͬ��Ӧ�ã�û�ж�Ӧ��ϵ

> ���иղ��Ǹ�����:���ڲ���--destination-port�е�destinationָ��������A����
> Router2��������B
> (��ݴ�A��B)? Ϊʲô��˵��"�����Լ�23������"?


�����̾���A��ROUTER2����һ��telnet����ROUTER2���������תȥ��B

���ROUTER2�ϵĹ���Ӧ���ǣ�
��A(SOURCE)������(DESTINATION)23�˿�(dport)��������ȥB��23�˿�
(--to-destination)


BTW������һ�������������������Σ�


> лл��Ļش�
>
> "madog" <no@no.no> wrote in message news:9nk9pl$mpf$1@madogcc.myip.org...
> >
> > "jkwoocn" <jkwoocn@yahoo.com> wrote in message
> > news:9nk7a9$35s$1@mail.cn99.com...
> > > ������A��IPΪ192.168.1.1
> >
> > ����ô˵�ľ�������һ����û����ʵ�������������Ŀ�أ�
> >
> > > ���ڲ���--destination-port�е�destinationָ��������A����Router2������
��
> B?
> >
> > destination
> >
> > > ʹ������������������
> >
> > ��ʾ��ʲô����һ��Could not open a connection to host: Connect failed ?
> >
> > >     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
> >
> > #iptables -t nat -L
> >
> > �ѽ����������һ��
> >
> >
> >
> > >
> > > "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: <9nklhl$npi$1@madogcc.myip.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!east1.newsfeed.sprint-canada.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.cn99.com!madogcc.myip.org!not-for-mail
References: <9njuf6$q9b$1@mail.cn99.com> <9nk07i$l63$1@madogcc.myip.org> <9nk7a9$35s$1@mail.cn99.com> <9nk9pl$mpf$1@madogcc.myip.org> <9nkgq2$99k$1@mail.cn99.com>

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-11 02:40:16 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!east1.newsfeed.sprint-canada.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.cn99.com!madogcc.myip.org!not-for-mail
From: "madog" <no@no.no>
Newsgroups: cn.comp.os.linux
Subject: Re: DNAT �� SNAT ����
Date: Tue, 11 Sep 2001 17:29:44 +0800
Organization: madogcc.myip.org
Lines: 124
Message-ID: <9nklhl$npi$1@madogcc.myip.org>
References: <9njuf6$q9b$1@mail.cn99.com> <9nk07i$l63$1@madogcc.myip.org> <9nk7a9$35s$1@mail.cn99.com> <9nk9pl$mpf$1@madogcc.myip.org> <9nkgq2$99k$1@mail.cn99.com>
NNTP-Posting-Host: 61.141.206.203
X-Trace: mail.cn99.com 1000201213 12805 61.141.206.203 (11 Sep 2001 09:40:13 GMT)
X-Complaints-To: usenet@news.cn99.com
NNTP-Posting-Date: Tue, 11 Sep 2001 09:40:13 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000