iptables 使用時注意的地方

2021-06-01 04:47:41 字數 813 閱讀 5921

1. 目的:想在atmel 開發板上實現雙網絡卡訪問, ppp0連線無線3g網路, eth0連線內網,便於內部出去和外部進來

2. 動作:設定iptables filter 和 nat表

iptables -p forward drop

iptables -a forward -m state --state established,related -j accept

//外部訪問內部

iptables -t nat -a prerouting -d $outip -p tcp --dport $port -j dnat --to $testip:$port

iptables -a forward -d $testip -p tcp --dport $port -j accept

iptables -t nat -a postrouting -d $testip -p tcp --dport $port -j snat --to $innerip

//內部訪問外部

iptables -t nat -a postrouting -s 10.13.2.0/24 -j snat --to $outip

iptables -a forward -s $testip -j accept

3. 結果:使用公司pc機(windows 和 ubuntu)都試了,不行,登入總是失敗。苦苦除錯3天。。。。

今天拿來android手機,3g上網,登入成功了。。。。

**,原來公司區域網下套了。。。。大家要吸取教訓,有些時候並不是你程式或配置問題,而是其他環境影響。

btw: 公司網管總是默默無聞的改規則。。。防不勝防

background size使用時的注意點

background size要寫在background image後面,否則background size不會生效 comment clist item code 這樣寫,background size是不生效的 必須這樣寫 comment clist item code 如果乙個後面的乙個樣式修...

UITableViewCell使用時注意事項

1,注意使用重用機制 有利於提高效率 2,做到通過改變模型去間接改變ui樣式 做到永久改變,無論怎樣拖動重新整理,都不會恢復改變 3,在通過傳遞模型給cell控制項布局時,記得完全覆蓋 嗯,不好解釋,主要是在重用機制引起的,如果不完全覆蓋,則在重用時,可能被另外乙個cell引用,造成顯示資料的錯誤 ...

UpdatePanel使用時注意說明

在使用微軟提供的ajax時注意乙個頁面form 的id與name千萬不能一樣。如果一樣的話,updatepanel的無重新整理就不會起到作用!例 乙個頁面裡面可能會有多個使用者控制項 uctop topindex runat server id indextop 可能一些控制項裡面會有乙個form....