Iptables 使用
d[@more@]First you need to tell your kernel that you want to allow IP forwarding.
echo 1 > /proc/sys/net/ipv4/ip_forward
Then you'll need to configure iptables to forward the packets from your internal network, on /dev/eth1, to your external network on /dev/eth0. You do this will the following commands:
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/sbin/iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
/sbin/iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
===============================================================
===============================================================
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9697/viewspace-1056118/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- iptables 使用手冊
- Debian使用iptables-persistent持久化iptables規則持久化
- linux之iptables使用Linux
- iptables 常用規則使用例項
- iptables使用詳解(centos7)CentOS
- Iptables防火牆規則使用梳理防火牆
- iptables基礎原理和使用簡介
- 使用netfilter/iptables配置防火牆(轉)Filter防火牆
- 使用IPtables搭建防火牆的規則(轉)防火牆
- 使用iptables建置Linux 防火牆(2)(轉)Linux防火牆
- 使用iptables建置Linux 防火牆(3)(轉)Linux防火牆
- iptables配置
- centos 7 中沒有iptables 和service iptables save 指令使用失敗問題解決方案CentOS
- iptables詳解及docker的iptables規則Docker
- 使用iptables實現資料包過濾(轉)
- iptables報錯!iptables-restore unable to initialize table 'filterRESTFilter
- iptables和firewalld
- iptables詳解
- Iptables 實操
- iptables應用
- iptables系列五
- iptables系列二
- 防火牆IPTABLES防火牆
- IPtables 詳解
- iptables的用法
- [iptables] 基於iptables實現的跨網路通訊
- IPTABLES-SAVE手冊頁&IPTABLES-RESTORE手冊頁REST
- Iptables入門教程
- Iptables 最佳實踐 !
- iptables的問題
- iptables 功能詳解
- iptables 入門(轉)
- IPTables配置Script(轉)
- Iptables 指南 1.1.19
- RHCSA 系列(十一): 使用 firewalld 和 iptables 來控制網路流量
- centos8 Iptables配置CentOS
- docker宿主機iptables配置Docker
- Iptables防火牆應用防火牆