2016年12月2日 星期五

解決 Debian-sh4 for NextVODBox 的 iptables 無法使用

網樂通是安裝下面網址的版本
https://ftp.yzu.edu.tw/Linux/debian-sh4-for-nextvod/download.php

架PPTPD時發現iptables 沒班法用
只好重新編譯Kernel & modules 了..QQ

1.取得config
ssh登入網樂通
取得 /proc/config.gz

2.修改設定
參考這篇
http://mowei-tw.blogspot.tw/2016/12/kernel-modules.html

在編譯的時候
做完make mrproper
config.gz 解壓
把"config" 改名成".config"
mv condig .config

make ARCH=sh CROSS_COMPILE=sh4-linux- menuconfig

參考這文章改設定
https://groups.google.com/forum/#!topic/asterisk-tw/3-Dalh3FZYQ

Networking  ---->
 Networking options  ---->
  Network packet filtering framework (Netfilter)--->
   Core Netfilter Configuration ---->
    <*> Netfilter connection tracking support
    <*> Netfilter Xtables support (required for ip_tables)
    <*>   "NFLOG" target support
    <*>   "conntrack" connection tracking match support
    <*>   "state" match support
   IP: Netfilter Configuration --->
    <*> IPv4 connection tracking support (required for NAT)
    <*> IP tables support (required for filtering/masq/NAT)
    <*>   Packet Filtering
    <*>     REJECT target support
    <*>   Full NAT
    <*>     MASQUERADE target support
    <*> Packet mangling

儲存
蓋過kernel.config
編譯

編譯完檔案:
https://drive.google.com/file/d/0Bx2A-Jefadp8SVFYbGlNZk1HNlU/view?usp=sharing


更換Kernel 
cd /tmp
mkdir boot
mount /dev/sda1 boot
cd boot
把vmlinux.ub 換成新的
mv vmlinux.ub vmlinux.ub.bak
wget (新vmlinux.ub位置)

放置modules 

cd /lib/
mkdir modules 
cd  modules
wget (2.6.32.59-PDK7105-32BITS.tar)
tar -xvf 2.6.32.59-PDK7105-32BITS.tar


都OK後
reboot

uname -a
出現
Linux debian-wheezy-sh4 2.6.32.59-PDK7105-32BITS #6 PREEMPT Fri Dec 2 23:50:40 CST 2016 sh4 GNU/Linux

 iptables -L
不再有錯誤訊息了!
成功

沒有留言:

張貼留言

預測2031/1/1可能 TWCA 憑證 IOS會出現不信任

緣由: TWCA CYBER Root CA 有兩張、兩個效期 (2030、2047年到期) 推測TWCA 預計 2030年12月會停用: TWCA CYBER Root CA (2030 年到期) TWCA Global Root CA 改用啟用: TWCA CYBER ...