🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

DNAT �� SNAT ����

#14324
From: jkwoocn
Date: Tue, 11 Sep 2001 02:57
18 lines
2094 bytes
����,���繹������

  ______             _______             _______            ______
  |     |           (       )           (       )          |      |
  |����A|-----------(Router 1)----------(Router2)----------|����B |
  |_____|           (_______)        eth0(___)eth1         |_____ |
  128.1.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: <9njuf6$q9b$1@mail.cn99.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!news.cn99.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: 10b277,4fc98b59a1330052,start
X-Google-Attributes: gid10b277,public
X-Google-ArrivalTime: 2001-09-10 19:55:36 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!news.cn99.com!not-for-mail
From: "jkwoocn" <jkwoocn@yahoo.com>
Newsgroups: cn.comp.os.linux
Subject: DNAT �� SNAT ����
Date: Tue, 11 Sep 2001 10:57:25 +0800
Organization: Bentium Ltd. (CN99)
Lines: 22
Message-ID: <9njuf6$q9b$1@mail.cn99.com>
NNTP-Posting-Host: 61.170.136.115
X-Trace: mail.cn99.com 1000176934 26923 61.170.136.115 (11 Sep 2001 02:55:34 GMT)
X-Complaints-To: usenet@news.cn99.com
NNTP-Posting-Date: Tue, 11 Sep 2001 02:55: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