自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Linux iptables將nat中內(nèi)網(wǎng)多臺ftp服務器映射出去

運維 系統(tǒng)運維
Linux iptables的問題,我們遇到好多,其中不乏亮點,本文將為大家一個小亮點:Linux iptables將nat中內(nèi)網(wǎng)多臺ftp服務器映射出去。

我們來看看Linux iptables將nat中內(nèi)網(wǎng)多臺ftp服務器映射出去的具體方法。

  首先分兩步:

  1 首先把三臺ftp服務器的源地址轉(zhuǎn)換成網(wǎng)關(guān)的地址

  192.168.0.254是網(wǎng)關(guān) 10.0.0.0/24 是網(wǎng)段

  iptables -t nat -A POSTROUTING -s 10.0.0.0/24 --sport 20,21 -j SNAT --to-source 192.168.0.254

  如果網(wǎng)關(guān)是動態(tài)ip,可以這樣

  iptables -t nat -A POSTROUTING -s 10.0.0.0/24 --sport 20,21 -j MASQUERADE

  2. 把網(wǎng)關(guān)源地址轉(zhuǎn)換成外網(wǎng)的地址

  iptables --table nat --append POSTROUTING -s 192.168.0.254 -j SNAT --to *.*.*.*(外網(wǎng)公布IP)

  3。和dns結(jié)合

  iptables -t nat -A POSTROUTING -s 10.0.0.0/24 --sport 53 -j SNAT --to-source DNS服務器IP

通過文章,我們不難看出Linux iptables將nat中內(nèi)網(wǎng)多臺ftp服務器映射出去的過程還是很簡單的。

【編輯推薦】

 

責任編輯:趙鵬 來源: 網(wǎng)絡轉(zhuǎn)載
相關(guān)推薦

2011-03-21 15:45:55

ClusterSSH管Linux服務器

2011-03-17 13:55:23

iptablesNAT端口映射

2011-03-16 10:43:36

2011-03-16 09:05:33

2011-01-18 09:12:47

Linux服務器集群系統(tǒng)

2021-09-16 07:52:18

FTP服務器Linux

2011-03-16 09:05:34

iptablesnat

2019-08-21 14:22:31

Linux服務器FTP

2011-03-07 17:04:02

ProftpdFTP

2010-08-23 17:23:57

DHCP服務器

2017-08-23 10:18:42

2010-08-29 21:29:25

DHCP服務器

2010-11-08 11:53:16

2009-04-23 18:17:31

LinuxFTP服務器

2011-07-28 13:36:53

2009-02-27 13:22:00

2011-09-09 10:03:39

Ubuntu 11.0FTP服務器

2009-10-27 13:44:04

linux FTP服務

2010-02-06 10:16:17

Linux YUM

2010-01-05 09:55:43

點贊
收藏

51CTO技術(shù)棧公眾號