顯示具有 linux CD router 標籤的文章。 顯示所有文章
顯示具有 linux CD router 標籤的文章。 顯示所有文章

2020年3月1日 星期日

關於 「Route」的一個列表?(精彩) Part_2

繼2011年5月11日 星期三 關於 「Route」的一個列表?(精彩)

這算是第二次發列表?

來源 https://www.linuxcambodia.com/news/top-awesome-open-source-firewall-gateway-and-appliances




Below are the top list of open source firewall, gateway and appliances.

BrazilFW (Free) Mini Linux distribution designed to be used as a Firewall and Router that runs easily on older computers.
ClearOS Community (Free) Linux distribuiton designed for use in small and medium enterprises as a network gateway and network server with a web-based administration interface.
Endian (Free) Linux based product designed for home that can transform any unused hardware appliance into a full-featured Unified Threat Management solution and to make security simple and help protect home networks by using the power of Opensource.
IPCop (Free) The IPCop Firewall is a Linux firewall distribution. It is geared towards home and SOHO users. The IPCop web-interface is very user-friendly and makes usage easy.
IPFire (Opensource) The Open Source Firewall Distribution.
NethServer (Opensource) NethServer is an operating system for Linux enthusiasts, designed for small offices and medium enterprises.
OPNsense (Opensource) OPNsense is an open source, easy-to-use and easy-to-build FreeBSD based firewall and routing platform.
pfSense (Opensource) The pfSense project is a free network firewall distribution, based on the FreeBSD operating system with a custom kernel and including third party free software packages for additional functionality.
Smoothwall (Free) Free firewall that includes its own security-hardened GNU/Linux operating system and an easy-to-use web interface.
Sophos UTM Home Edition (Free) Sophos UTM is easy to use, thanks to the configurable real-time dashboard, flexible modular licensing, and intuitive reusable network object definitions.
Untangle NG Firewall (Free) NG Firewall manages every aspect of network control from content filtering to web caching, remote access to policy enforcement, all in one simple, drag & drop interface.
VyOS (Opensource) VyOS is a community fork of Vyatta, a Linux-based network operating system that provides software-based network routing, firewall, and VPN functionality.
Zentyal Server (Opensource, Forum) The on-premise Mail and Directory server.
I hope you find it useful and help you gain a lot of knowledge, cheers guys.

2014年10月13日 星期一

【誤導】我的三篇文章

在玩 Zentyal 時,在架設 WEBMAIL 時,我被這 3 篇文章,誤導........................


---------------------------------------------------------------------------------------------

I did what you said and things are working even after rebooting.  Here's what I did to fix it.

1. Disabled the webmail module through the 'Module Status' section of the admin interface.

2. Deleted the webmail service from the Software Managment - > Zentyal components section of the admin interface.

3. I opened /etc/mysql/conf.d/zentyal.cnf and modified the line to read innodb=on.

4. I found the password to mysql by looking in this file... /var/lib/zentyal/conf/zentyal-mysql.passwd

5. I ran this command and supplied the password.
sudo mysql -p

6. Then I issued the following commands
show databases;  (this will show you the databases)

DROP DATABASE roundcube; (this deletes the roundcube databse)

exit  (this exits the mysql command prompt.

After doing this, I reinstalled the webmail service, enabled it and it all worked!

Thanks again to all that posted to help out.

Then reinstalled the webmail service via the Software Management -> Zentyal Components menu.



---------------------------------------------------------------------------------------------




To fix this:
Disable the webmail service in 'Module Status'
sudo nano /etc/mysql/conf.d/zentyal.cnf
and change this line as shown: innodb=on
then: service mysql restart
get the MySQL pass: sudo cat /var/lib/zentyal/conf/zentyal-mysql.passwd
then: sudo mysql -p
Execute this query: DROP DATABASE roundcube;
Run this script: sudo /usr/share/zentyal-webmail/enable-module
Re-enable the webmail service in 'Module Status'

Easy huh. Everything is working now. Think about it when you click Next.




---------------------------------------------------------------------------------------------





My case

remark this
  #innodb = off
and
  service mysql restart

is not enough. I must replace password for roundcube user at mysql too.
Zentyal generate password at this file /etc/roundcube/debian-db.php
and Mysql admin at this file /var/lib/zentyal/conf/zentyal-mysql.passwd.

  mysql -u=root
  mysql> use mysql;
  mysql> update user set Password = PASSWORD('Password roundcube from debian-db.php') where User = 'roundcube';


【駭客推薦】Zentyal 快速架站

Zentyal 是一款快速架站軟體

以下是【 Zentyal 電子文件導覽】已經放在我的 Google 雲端
https://drive.google.com/file/d/0B90SMcKh12QiRHoxbm55N3hZSkk/view?usp=sharing
https://drive.google.com/file/d/0B90SMcKh12QiUXBHZWhtNThnUGM/view?usp=sharing
https://drive.google.com/file/d/0B90SMcKh12QiVzhIa1NOT2VoM0E/view?usp=sharing
https://drive.google.com/file/d/0B90SMcKh12QiemRYd0NXVzJ6bU0/view?usp=sharing


Zentyal 官方下載 http://www.zentyal.org/server/

Wiki 介紹 http://en.wikipedia.org/wiki/Zentyal


他的特點?就是【該包含的都包含】囉!

通信服務器(與Microsoft Exchange純互通):郵件服務器,群件,IM服務器 
辦公室服務器(與微軟活動目錄本地互操作性):LDAP目錄服務器,文件共享和域名服務,打印機共享,備份 
基礎設施:DHCP,DNS,NTP,CA,Web服務器,FTP服務器,UPS的管理 
網關與UTM:配置網絡接口,醫管局,高級防火牆,高級路由,流量整形和服務質量,先進的HTTP代理,強制網絡門戶,RADIUS,VPN,IPS/ IDS

他還支援【 TLS 技術】

他還分門別類,幫你規劃好一些常用的 GNU 套件。

不要懷疑,下面的每一個圖像,都代表,他能夠實際提供的你,架設出來的網路服務。



從 Zentyal 2.3. 版後,支援 CPU 的 linux kernel 必須要設定 boot down 才可以運作?不然就是修改BIOS 的處理器支援條件。



架設完成之後?

完全 WEB 界面操作




Web Mail Server

補充一點:他的 WEBMAIL 設定起來,有一點點小細節,是非常的有趣,致使連我都被搞迷糊,是否自己的 GNU 觀念落後了,就跑去上去官方網站.........爬文,還被誤導.........


最後,還是搞出來.......Roundcube Free Mail Web



這套 Zentyal 是基於 Debian 的叛逆者 ubuntu 做出開發平台,因此?他能夠建立在【Debain、Ubuntu 】環境當中.............

但我要先說..............千萬不要拿【現有系統】去安裝這東西,否則?你就算把 Zentyal  移除,你的系統要恢復原來狀況,你恐怕要花費不少功夫。

一、獨立建構的 Desktop 來配合他的管理介面

二、獨立設計的 Soft SET 來配合他的作業過程

所以?如果要安裝他............就弄一個虛擬機來做,會比較好。

後面?

我將會用這套東西,應用其功能達成【管理 Route、Mail、SMB、FTP】的個人站台,前提是【各項功能】在測試後,要能夠正常運用,而且沒有漏洞.................

然後?我會把架設過程,分享出來......除了 Web Mail Server 架設的部分........

這東西本身內見兩套 SQL  服務,但 Mysql 被 Roundcube 用了;所以我只能用 PGSQL 做自己想做的 SQL on 我想...........這對我會是一個有點頭疼的問題,畢竟 Mysql 用習慣了。





還有一個叫做 iRedMail 的東西.........正準備上手試試

另外一個經常被拿來和 Zentyal 比較的是 ClearOS 提出的快速架站功能.............

直覺上 ClearOS 將 WEMIN 完全結合成單一介面...................畢竟他是受 RedHat 支持,而做出的應用表現。

Zentyal 是運用【 eBOX 】界面整合,來引導設定操作。


總之?這兩款東西,都適合拿來練練手,尤其是  ClearOS 算適用 LXE Desktop 的呼叫,在應用上,可以說是【非常好】,可以看見 Linux 系統在簡約設計,來完成表現。

2011年6月11日 星期六

網路卡、路由表、iptab 表、btctl show(五)防禦對象

127.0.0.0/8
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16

來自一些解析對象,本身擁有「取代 Root 訊息」的路由位置?其實也是一種弱點!

經常因此?遭遇到攻擊...........
甚至是「網路管理」發生誤判!將訊息列為「localhost IP」而發生駭客入侵成功!

因此?

和幾個朋友討論後,一致認為?「內網\外網」的路由原則。

其實?最好將「一些不需要得解析來源?都清除乾淨!」但問題是?


簡易轉址 (Redirect + Frame Forwarding)
網域對應轉址 (CNAME)
IP 轉址 (A)
自行架設 DNS 管理子網域 (NS)
郵件交換主機 (MX 為 Mail eXchanger)


不得不去思維.......所遭遇認定「127.0.0.1\loopback\localhost 」其他服務?就算了嗎?或基於 port : 53 的發生?原因是什麼?

而誤將外網來源?映射成「本端」,這種問題?

經常是路由管理,在發配「路由秩序」時,經常必須重建的原則!

但要如何避免?

不是自己的 Root 路由標記,就不要去信任?

因此?要先去過濾「路由發生的過程」...................




2011年6月10日 星期五

設置網路環境 >> 資訊環境落實

電信機房 >
電信線路(有線\無線) >
室外交換機(電信線路) >
戶外埋管線路(地下有線設施\地上有線設施) >
電話信號盒(你家申請電話號碼時,會有的登記盒子。) >

電話線路進入你家 > ADSL 數據機 >

(ISP公司,只核對到「ADSL數據機」燈號標示正常;即可!)

你家\公司行號\辦公網路\網路咖啡

一般家庭;頂多是一隻「HUB」就能決定了。

簡稱「乙太網路交換器」

從一般家用「 4 ~ 8 ~ 16 ~24 接口」不定,用途單純就是「網路交換器」。



.
當然?也會有比較高級的...........「網管功能」............例如:防火牆、Route、或是「DNS 伺服器、GW 伺服器」之類,功能就非常複雜!

一些比較進階的使用者?能夠經由「寬頻分享器\IP分享器」來作為「ADSL 撥號設備」,完全由「寬頻分享器\IP分享器」去統籌「ADSL 寬頻分配」!

有些甚至具有「VPN功能、PPTP功能、無線網路(WIFI)、FW伺服器(防火牆)、WEB伺服器、Print 伺服器、FTP 伺服器、NSA伺服器、VLAN、Port Bandwidth、Port Mirror、IP MAC」一體化的功能!

價位?因功能而異!價位自然越高!


但大多數?差異都不大!


先前曾經說過得「軟體路由、系統路由」「Linux CD Route、MikroTik RouterOS、FreeNAS、pfsense、m0n0wall」都是具有「網路管理」的環境能力。

而一些公司行號?為了省卻「數十萬、數百萬」去買「防火牆、VPN網路」,也會採取「軟體路由、系統路由」來完成「網路管理」。

當~這可以省下「數十萬~數百萬」的費用時?

學習這些「軟體路由、系統路由」就顯得更有競爭效益!


畢竟?

在資訊產業,不是動輒花「十萬~百萬」就是「補不回的缺口」~~

這也讓很多依賴「資訊產業」的商業行為?乾脆停止「資訊花費」,來停止流血!

有些公司........經常找一些有證照的........「小朋友、新鮮人」來從事相關工作?但這並不能止血!只會花更多錢!

~甚至~~不能彌補「經濟效益」使得問題減少!



其實?一個「專業」的資訊工程師?

一些基礎能力,很重要!

一、搭設實體網路
二、架設系統平台(安裝作業系統、帳戶群管理)
三、資料庫群建構(例如:MYSQL、MSSQL、ORACLE、DB2、AS400)
四、服務平台登錄(例如:WEB伺服器、Clinet APP、語言管理環境)


有些企業主,會認為「資訊外包」好像比較省錢?其實不然!

有時候,「外包」反而減少「標準需求」的建立!


很多「現有系統」在修改上不便?或是操作上疏漏~~就經常造成「諸多不便、甚至困擾」。

而在一些「管理背景」上,缺乏「實務流程」相之配合?也造成很多「困境」。

甚至難以「朔及管理層」的查證...................這稱為「資訊詬病」。


「系統分析、流程設立、管理實務、資訊推展」就顯得格外重要!


「 Dark Man 」在十幾年內,就看過 N 多件,「資訊系統」的使用,不能配合「實務需要」,而產生差異!

(PS.這種差異,使得工作人員,必須付出加倍的「時間、精神、健康」,去證明「實務設置」的需要,也不會獲得「資訊功能」上的改善,使得一切資訊上的疏漏,必須由「少數人力」去彌補!)


這在管理者?根本不懂「資訊缺失」,該如何去「彌補」,最後只好?硬著頭皮去使用~~這些「不能符合現況」的系統環境。


如果發生在「醫療系統」上?將會「慘不忍睹」!
如果發生在「物料管理」上?將會「難以重建」!
如果發生在「跨國系統」上?將會「訊息疏漏」!


總之?這些問題,並不單純!


而且往往是「當事人」對於資訊管理的「認同不足」,找錯人而必須「花費高額」費用!去建制「一個網路環境」,甚至疊加許多「異常費用」的產生!


但在「會計系統」?則沒有那一個老闆會「不捨得花錢」!

他們甚至希望「會計帳目」,能夠隱藏各種試算方式!


例如:「到期、非到期、物流、金流、資產、物產、剩餘資金、預估分配」甚至更多功能?


所以?和賺錢有關.............,甚至能夠證明「賺更多錢」時,老闆才願意稍稍投注「籌碼」?

但老闆?為何會忘記?與營業更加密切..........的.......管理系統,為何沒有「能夠顯示」整個「營業服務」的實踐。

2011年6月9日 星期四

網路設備配置的順序.....

基本上順序弄錯ㄌ
你就玩不起來ㄌ

Broadband Modem = ADSL  數據機
Wireless Router = 路由分配器 = 俗稱 IP 分享器(有線、無線)
當然有些特殊的「路由設備」可以同時取代「Broadband Modem、Wireless Router」

例如:

之前介紹過的「Linux CD route」就算是「Wireless Router」這部份!

若你的 Linux CD route 有配置「通訊 ADSL 封包」的功能,去取代「Broadband Modem」?那「中華電信」的小屋龜,你都還給「中華電信」或「將烏龜掛牆上」。


實施的情況?就如下圖!(噓!這圖片是「國外網站」偷來ㄉ)


配置順序,在硬體設施上,是不能夠錯誤的!否則將會不能通連!

2011年5月11日 星期三

支持國產 Mini Firewall 再來一次圖文介紹!

下載、說明、安裝、操作「 http://minifw.luohuedu.net 」我省事,也省力,你們就狂下載ㄅ

然後呢?



抄來ㄉ


1MINIFW支持雙ADSL撥號以及負載平衡(負載平衡腳本來自巴西人的shell,但BRW本身沒有集成雙ADSL撥號腳本)
2
MINIFW支持多線程libpthread.so ,BRW曾經在brazifw2.29支持過,後來不知道什麼原因,在brazifw2.30不支持多線程,並退回到COYOTE2.23時期的開發系統上編譯開發brazifw2.30
3
MINIFW採用UCLIBC.9.27+GCC 3.4.4PERL獨立開發系統。brazifw採用的是COYOTE2.23的開發環境UCLIBC.9.26+GCC3.3.2PERL
4
brazifw支持PPTP IPSEC ,比較有水平,但對管理人員水平要求更高 ;MINIFW只支持PPTP,但非常簡單好用,如果你們VPN撥號到我的路由器,還可以享受借線功能,以我的病毒網關做路由上網,幫你免費過濾殺毒。
5
brazifw支持橋,而且集成了ebtable補丁,我沒有用過,但在SOURCEFORGE上看,它應該做得很好。MINIFWbridge.o支持,但沒有集成強大的補丁,也沒有寫專門的腳本.
6
MINIFW支持WEB內容綠色過濾,brazifw沒有.
7
MINIFW企業版本支持病毒網關,brazifw沒有。
8)3322.org
動態域名,MINIFW能很好支持,很快。brazifw不支持,對國外的動態域名管理界面做的非常好。
9)
bfw 3.0開始有獨立的開發環境,但已經不是uclibc,而是用lfs做的glibc環境,對路由器而言,太大!

關於 「Route」的一個列表?(精彩)

Dark 取自  http://blog.sina.com.tw/evan910/article.php?pbgid=64137&entryid=597984

原始來源 http://www.routerbbs.com/archiver/tid-36266.html

目錄
1.        BBIagent        2
2.        LRP(Linux Router Project)        2
3.        Floppyfw        2
4.        hi-spider海蜘蛛        2
5.        CoyoteLinux(北美土狼)        3
6.        FreeSCO        3
7.        SmoothWall        3
8.        IPCOP        3
9.        RouterOS        4
10.        Fli4l        4
11.        Clarkconnect        5
12.        10。        5
13.        m0n0Wall/Pfsense        5
14.        PicoBSD        6
15.        BSDBox        6
16.        Windows共享上網技術        7
17.        基於Linux軟路由        7
18.        基於BSD軟路由        7
19.        其他代理服務器        7
20.        Panabit 流控引擎        7
21.        路由論壇        8
22.        FreeNAS        8
23.        AskoziaPBX        9
24.        WayOS        9
25.        Checkpoint        9
26.        brazilfw(北美銀狼)        9
27.        Fresco        9
28.        Zeroshell        9
29.        Minifw        9
30.        Openwrt        10
31.        DD-WRT        10
32.        Pp        10
33.        Vyatta        10
34.        Untangle        11
35.        snapgear        11
36.        e-router        11
37.        Proxomitron        12


1. BBIagent
老牌的中文軟路由bbiagent,全中文,但需要註冊購買,已經漸漸的淡出和停止開發。http://www.bbiagent.net/gb/index.html
2.  LRPLinux Router Project
LRP
源自Linux Router ProjectLinux路由器計畫),其目標是要實現微內核結構的瘦伺服器,用於閘道/路由器/防火牆。與發行版Linux架構的路由器相比,LRP路由器顯著的優點是系統效率高、硬體成本低。
coyote一樣,都是放在記憶體上運行的.個人認為要是對路由要求不高,或者急需使用NAT的朋友們可以使用一下!根據實際測試,穩定性不如Red hat.速度和功能不如RouteOS.所以在這裡不是很推薦長期使用
Linux Router Project(LRP)
是 一個很小但功能很強的軟體。它小到只要一張1.44MB 的軟碟就可以放下,但是卻可以建立和維護路由器、入口伺服器、瘦伺服器、瘦用戶端以及一些網路工具。而且它的設置很簡單, 基本上不懂 linux 也可以設置。本站為您提供的是它的源代碼,比較大。
http://download.enet.com.cn/html/222122001020801.html
3. Floppyfw
最早的linuxLRP項目之一的產物。跟coyote一樣,都是放在記憶體上運行的.個人認為要是對路由要求不高,或者急需使用NAT的朋友們可以使用一下!根據實際測試,穩定性不如Red hat.速度和功能不如RouteOS.所以在這裡不是很推薦長期使用。
http://www.zelow.no/floppyfw

4. hi-spider
海蜘蛛
國產的軟路由,全中文,上手簡單功能實用。功能:防火牆,防ARP,流量控制,策略路由,負載均衡,QOSPPPOE,WEB緩存,VPN......個人認為是目前免費中文版最好的路由.
演示位址: http://211.161.148.58:880/
下載中心: http://211.161.148.57/support/download

5. CoyoteLinux
(北美土狼)
方便好用,負載能力強,一張軟碟即可。免費
http://www.cnoyotelinux.com
CoyoteLinux
U盤啟動補丁
http://www.router.net.cn/Soft/softrouter/CoyoteLinux/200503/121.asp
CoyoteLInux2.2
增加版
http://www.router.net.cn/Soft/softrouter/CoyoteLinux/200503/120.asp
CoyoteLinux
原版說明書(英文)
http://www.router.net.cn/Soft/softrouter/CoyoteLinux/200502/88.html
CoyoteLinux2.16forLinux2.16
http://www.router.net.cn/Soft/softrouter/CoyoteLinux/200502/87.html
CoyoteLinuxforWindows2.16
http://www.router.net.cn/Soft/softrouter/CoyoteLinux/200502/86.html

6. FreeSCO
看名字就知道她的能力了,免費的類cisco路由軟體:http://www.freesco.info
7. SmoothWall
基於Linux內核,安裝維護容易,推薦初學者使用
http://www.smoothwall.org/


8. IPCOP
讓壞的資料包在IPcop面前消失,非常不錯的.SmoothWall是用一個內核開發的,功能也不相上下
http://www.ipcop.org/
ipcop1.4
http://www.router.net.cn/Soft/softrouter/OtherRouter/200502/91.asp
ipcop1.3
http://www.router.net.cn/Soft/softrouter/OtherRouter/200502/90.asp
IPCOP
中文使用說明書1.31
http://www.router.net.cn/Soft/softrouter/OtherRouter/200502/89.html
IPcop1.45
正式版
http://www.router.net.cn/Soft/softrouter/OtherRouter/200504/179.html

9. RouterOS
Mikrotik RouterOS--
世界最知名的專業級軟路由,市場佔有率最高;安裝、策略路由、負載均稀、多WAN、腳本、VOIP
這個軟體有點爭議,號稱ISP級軟路由,支援多路由協定。 對於新手來說配製有點難。
http://www.mikrotik.com/

RouterOS
中文使用手冊(獨家推出,吐血推薦)下部完中文版
http://www.router.net.cn/Soft/softrouter/RouterOS/200503/165.html
RouterOS
中文使用手冊(獨家推出,吐血推薦)上部
http://www.router.net.cn/Soft/softrouter/RouterOS/200503/164.html
10. Fli4l
德國的一個軟路由,對ADSL支持非常好
fli4l
是基於 linux 的路由軟體,適用於 ISDN DSL 和乙太網。默認配置只要一個 3.5" 軟碟。運行於 x86 平臺 - 一個 486 16MB 記憶體就夠大多數應用了。

啟動軟碟可在 Linux Windows 下建立,根本無需什麼 Linux 知識。

fli4l
可通過模組擴展功能,從而建立一個最適合你自己的路由。例如官方模組可實現VPNproxy XEN。 你也可以自己寫擴展模組,當然需要一定的 Linux / Unix 技能了。 我們的資料庫裡面也有一些貢獻的模組。
http://www.fli4l.de/
11. Clarkconnect
也是來自德國的如路由,功能無比強大,就是體積大了點,像個大胖子。 一款閘道伺服器軟體,可以將普通的PC機變成一台方便易用的寬頻閘道伺服器,基於Linux平臺,集成了防火牆、安全工具以及檔、列印、Web email、代理、反病毒、反垃圾郵件、內容過濾和VPN伺服器等等功能 這個路由能獨立控制網內機器帶寬,能多線路捆綁,功能超多.安裝的機器要求比較高,個人認為網路要求高的朋友使用
除了擁有普通軟路由的基本功能以外,還有資料庫伺服器、web伺服器、E-mail伺服器、WEB緩存等功能。
http://www.clarkconnect.com/
http://www.clarkconnect.org
12. 10
http://www.netboz.net/
11
.
http://www.docum.org/docum.org/
13. m0n0Wall/Pfsense
基於FreeBsd開放的M0N0Wall/Pfsense不會讓你失望的軟體路由器軟體。
http://m0n0.ch/wall/
國內的技術論壇 http://bbs.m0n0china.org
基於FreeBSD
http://www.freebsdchina.org/
14. PicoBSD
http://people.freebsd.org/~picobsd/

15. BSDBox
BSDBox
FreeBSD的一種發行版本,它和標準版的區別在於,它完全運行在記憶體裡,除了booting和保存配置的時候需要讀寫盤,其他時候都是 不需要硬碟(或者CF卡或者U盤等等)的。設計它是由於,有時我們需要一個簡單的可靠的廉價的網路服務器。硬碟常常是伺服器系統裡最不可靠的部件,而CF 卡或者U盤更加廉價和可靠。

BSDBox
可以做很多的事情,只要是FreeBSD能做的。不過最擅長的應該還是網路應用,例如NAT閘道,代理伺服器,分佈計算,等等。

BSDBox
的設計思路來源於PicoBSD,不過沒有限制在PicoBSD一張floppy」的容量上,所以BSDBox可以放入更多的應用,而且 不需要削減版的netstatps等等應用。如果要把BSDBox放在FreeBSDsrc裡面,我想應該是在 src/release/bsdbox吧。
官方網站 http://bsdbox.sourceforge.net/瞭解BSDBox,從這裡開始
安裝文檔 詳見:http://wiki.lupaworld.com/index.php/BSDBox
作者自我介紹:
製作這個系統是在2001年,當時對PicoBSD比較感興趣,但是PicoBSD站點已經停止維護了,而且PicoBSD為了在一張1.44M的軟碟上 啟動,去掉了太多的工具命令。我製作的這個叫BSDBox,目的是在足夠小的Flash盤上啟動運行,對記憶體的要求也要足夠的小。
16. Windows下的代理、軟路由軟體
Isa 2000/2004
WinRouter
Internet連接共用、路由和遠端存取、WinGateSygate等經典共用上網軟體

17.
基於Linux軟路由
iptables
防火牆
Lintrack
Redhat 9.0 + Quick Linux
提供的firewall
18. 基於BSD軟路由
CoyoteLinuxuPnp
模組
http://www.router.net.cn/Soft/softrouter/BsdRouter/200503/122.asp
19. 其他代理伺服器
CentOS
安裝指南(中文版)
WinGate4.5
最終正式版
20. Panabit 流控引擎
準確的說,Panabit不是一個路由系統。而是一個帶應用層協議識別的網橋的系統,類似於RouterOS V3.X版本裡面出現的Layer 7技術。Panabit目前可以工作在旁路或橋接模式,目前不支援路由。

Panabit_
流控引擎官方網站首頁 http://www.panabit.com/
文檔http://www.panabit.com/document/index.html
下載中心 http://www.panabit.com/download/index.html
以下是Panabit官方的自我介紹:

Panabit
是目前國內開放度最高、免費、專業的應用層流量管理系統,特別針對P2P應用的識別與控制,截止20091025日,已經支持實際主流 應用360種以上,並以兩週更新一次特徵庫的速度持續更新(包括已支援協定和新增協定兩方面的更新,Panabit已識別協議列表請關注Panabit網 站首頁"支援協定")Panabit在精確識別協議即對應用分類的基礎上,根據用戶自定義策略,提供靈活方便的流量管理機制:帶寬限速、帶寬保證、帶寬 預留,並可基於協定/協定組、IP/IP組進行參數化的策略設置。

Panabit
流控系統定位於網路設備級OS,需要安裝在一台獨立硬體中。Panabit發佈的標準版,都是最新研究成果和最新穩定版本,無有效期等限 制,完全可以滿足DIY百兆級專業流控設備。Panabit在網站公開發佈的第一個標準版是Panabit V7.04,於2007.04.30 Panabit官方網站發佈。

Panabit
流控引擎,基於穩定性堅如磐石的FreeBSD開發,安裝Panabit之前,需要先安裝好FreeBSD 作業系統;為了方便使用,自Panabit V7.09起,同步發佈Live CD版,使用Live CD無需安裝,直接光碟啟動,Panabit即全部運行在記憶體中。

硬碟安裝方法:
下載15MBPanabit Live CD ISO檔、刻盤啟動,運行./setup腳本,自動安裝FreeBSD 7.2Panabit,指定管理網卡名稱、IP位址等,1-5分鐘搞定安裝!
Panabit
專業流控一鍵安裝全攻略http://www.panabit.com/document/autopanabit.html
安裝完成後控制臺登陸用戶名root密碼root
WEB
管理介面
系統安裝時,給定了管理網口的IP位址資訊,在流覽位址欄輸入:
https://192.168.7.2
(根據實際位址輸入)
對於IE 7.0,點擊繼續流覽此網站(不推薦)」,則進入Panabit流控系統管理介面,管理員用戶名是:admin,缺省口令是:panabit
21. 路由論壇
目前比較流行的軟體路由器都是國外的,國外軟體路由器開發商的官方網站不錯的學習地方。國內大家可以到以下網址學習:
中國路由網Www.Router.Net.cn
中國路由器論壇www.RouterBBS.COM

22. FreeNAS

23. AskoziaPBX

24. WayOS

25. Checkpoint

26. brazilfw
(北美銀狼)
基於Linux
27. Fresco
Freesco
的名字由來是FREE ciSCO的縮寫,開發者希望Freesco能代替網路上的專用路由器.
其他功能還有列印功能和samba
官方網站 http://www.freesco.org
28.  Zeroshell
還有來自義大利的

29. Minifw
國產的路由器系統。
穩定高速的路由器,採用獨立開發系統,WEB管理器借用了巴西人的BFW,BFW主要做iptables擴展模組開發;MINIFW開發目標,路由器功能只是其三分之一的功能,而更強大的功能是WEB過濾技術和木馬病毒解決方案.

支援多種接入方式(靜態位址、動態DHCPADSLMODEM等)上網的路由器兼防火牆。MINIFW3增加特殊過濾機制,不相容網路上的任何版本. 建議沒有使用過MINIFW的網友直接使用MINIFW3.10(或者minifw38軟碟版本),默認狀態是高速的路由器,增強模式可以作為綠色內容過 濾和客戶機病毒閘道過濾,網路上流傳的其他路由器版本目前都沒有內容過濾和病毒過濾功能。對於學校和家庭,最好使用MINIFW38光碟安裝版,最後硬碟 啟動,需要的硬體是:一張軟碟或者5GM硬碟+網卡兩張(intel pro100/rtl8139/dlink530tx/3com905/interl 100/vmware默認自動載入),實現的功能是:

強大的DHCP服務+安全的防火牆IPTABLES+高效過濾系統(P2P/色情、電影、未知病毒木馬等)+完美的客戶機病毒解決措施
官方網站 [url]http://www.minifw.com/[/url]
下載地址 http://www.minifw.com/modules/tadnews/index.php?nsn=5

30. Openwrt
還有很多家用和無線方面很棒的類似o
官方網站 [url]http://openwrt.org/
31. DD-WRT
32.        Pp
還有很多家用和無線方面很棒的類似
33.        Vyatta
軟體簡介: Vyatta software是一份完整的、即刻可用的、基於Debian的發行,它被設計為能將一套標準的x86硬體轉換為企業級的路由器/防火牆。Vyatta軟 件包括對常用網路介面、工業標準路由協定和管理協定的支援。與先前的開源軟體路由專案不同,所有的這些特性都可以通過單個的命令行介面(CLI)或是基於 web的圖形用戶介面來配置。Vyatta軟體可以以自由社區版本獲得,它也以捆綁軟體訂購的形式提供,這包含了維護、升級和技術支援.

官方網站http://vyatta.com/
34. Untangle
Untangle Gateway
是基於KNOPPIX的開源閘道系統,它帶有可插拔的模組以支援各種網路應用,這包括垃圾郵件阻擋、網頁過濾、反病毒、反間諜軟體、入侵阻止、虛擬專用網、SSL虛擬專用網、防火牆等等。
可以根據需要添加模組,阻止垃圾郵件,網頁過濾,遠端存取等等,不過添加的功能模組是收費的。 它分兩種版本,一種是應用程式,安裝在windows平臺上,還有一種是內含linux作業系統的光碟版。
硬體要求較高,下面是最低配置

CPU:  1G
以上
記憶體:  512M以上
硬碟:  20G以上
官方網站:http://www.untangle.com/
官方演示:http://www.untangle.com/demo/
35. snapgear
這一類的還有很多,非x86體系
36. e-router
國產路由器軟體,公司團隊人員都曾有著網吧行業工作的經歷,有著或多或少的網吧情結。原有免費版本發佈,20090312日已停止EROUTER免費版的使用。
「EROUTER
軟體路由器系統(簡稱EROUTER)是一套基於專業的FREEBSD 7.1平臺(PF防火牆+IPFW流控+MPD撥號)的高性能路由解決方案之一,針對網吧網路為中心進行合理的設計規劃。EROUTER是一套高效的中文軟體路由器程式!
   EROUTER支援目前網吧常用功能的簡易設置。(雙線策略路由負載均衡[掉線自動切換帶寬疊加]ARP綁定、單IP限速、網吧版動態限速、客戶機流量查看、PPOE伺服器、VPN伺服器、VPN借線等等功能)。
易網天祺網路科技公司成立於20068月,公司主要以系統集成、網路工程、LINUX系統方案應用等技術服務為主要業務。
官方網站http://www.e-router.cn
37. Proxomitron
Proxomitron
是一款被廣為使用的網頁篩檢程式,用戶可將其用作個人的代理伺服器,該軟體作者是 Scott R. Lemmon
Proxomitron 的作者 Scott R. Lemmon 200451日去世,年僅36歲。
Proxomitron
中文站 http://www.proxomitron.cn/


38. zebos
先把比較有代表性的列舉一下。以下肯定有很多錯誤。希望大家一起改正和補全。
名稱 基於什麼系統 是否有中文 是否免費/開源 簡單介紹/特點

m0n0wall    freebsd         易用穩定,功能較少
pfsense      freebsd          易用穩定,功能較強,硬體要求較高
海蜘蛛  linux        是最易用稍不穩定,功能較強,硬體要求較高
ISA系列  windows   企業用,需配合域環境才能發揮最大作用
endian  linux 有(不徹底)是 應該叫企業綜合伺服器,功能很多
clearconnect linux 有(不徹底)是 功能多。mdb資料庫,mail,路由,web.....
ROS  linux         功能是否強大取決於使用者

用過很多軟路由,第一個是BBIagent ,m0n0wall,pf,cl,minifw,ROS, 海蜘蛛,freesco,vyatta.MSS.CC.....

不知道BDSBOX,飛魚3200 2130版算不算.

喜歡CL的小巧,ROSMSSCC、海蜘蛛的強大功能。

最後在用ROS和海蜘蛛。

linux
上的router firewall 大全
http://en.wikipedia.org/wiki/Lis

BrazilFW
    BrazilFW is a Router/firewall distribution based on Coyote Linux
Cflinux
    Cflinux is intended to be a small, embedded linux based system, mostly usable for firewall (Linux kernel 2.4 with iptables), router (ripd, ospfd, even bgpd from quagga), 802.11a/b/g access point (hostap and madwifi drivers), IPSEC gateway (openswan), PPPoE server (with radius authentication, kernel PPPoE), PPTP access servers
CiscoASA
    Cisco ASA 8.x.x is Linux distribution used in Cisco ASA Security Appliances. An article in German, describing the contents of the package
ClarkConnect
    Router/firewall distribution
Collax Business Server
    A Router/firewall & web-, email- and database server distribution
Collax Security Gateway
    A specialized Router/firewall/IDS/IPS server distribution
Coyote Linux
    Router/firewall distribution
Devil-Linux
    firewall/router/server distribution running from CD
DD-WRT
    Embedded firewall distribution
eBox
    Router/Firewall and NAS/PDC
Eisfair
    small easy to install server
Endian Firewall
    Unified Threat Management distribution (Router/Firewall, Gateway Anti-Spam & Anti-Virus for Web, FTP and Email, Hotspot functionality)
EnGarde Secure Linux
    A Router/firewall & web-, email- and database server distribution
Fli4l
    a single floppy ISDN, DSL and Ethernet-Router
floppyfw
    floppyfw is a router with the advanced firewall-capabilities in Linux that fits on one single floppy disc.
FREESCO
    a free replacement for proprietary routers supporting up to 10 network cards and up to 10 modems.
Gibraltar
    Router/firewall distribution.
IPCop
    Router/firewall distribution
IPFire
    Router/firewall/homeserver distribution with webbased paketmanager
LEAF Project
    a customizable embedded Linux network appliance used as an Internet gateway, router, firewall, and wireless access point.
Ideco Gateway
    Advanced Router/Firewall distro
OpenWrt
    Modular embedded distribution for ARM, MIPS, PPC and x86 devices.
M0n0wall
    A Router/firewall distribution based on FreeBSD.
PfSense
    A free, open source customized distribution of FreeBSD tailored for use as a firewall and router.
PyramidLinux
    A wireless router distribution for x86 embedded systems.
redWall
    Router/firewall distribution
Sentry Firewall
    A firewall, server or intrusion detection system distribution
SME Server
    A Router/firewall[citation needed] & web-, file-, email- and database server distribution based on CentOS
SmoothWall
    Router/firewall distribution
The Linux Router Project
    Router distribution (Defunct as of 2003)
Trustix
    Router/firewall distribution with SSH and GCC included if desired.(Defunct as of jan 2009)
Untangle
    GPLv2 Firewall & Router that runs 12 open source applications including Spam Blocker, Virus Blocker, Web Filter, OpenVPN & More.
Vyatta
    Enterprise-class routing, security and traffic management with simple-to-use interfaces designed as a network operating system that runs on Intel/AMD as well in virtual environments.
Zeroshell
Web administrable router/firewall live CD with QoS features. It is also able to act as a Wi-Fi Access Point with advanced features such as the Multiple SSID and 802.1x RADIUS Authentication. Zeroshell supports VLAN trunking (802.1q), bridging and WAN load balancing and failover features.

FreeBSD
Monowall
(FreeBSD based)
pfSense
(derived from Monowall, see tutorial)
Linux
LEAF

ME2000
(Linux wireless node based on LEAF)
WRAPCOP
(ready to use IPCOP image)
GNAP
(Gentoo Linux based)
Amsel

Pebble Linux

Metrix Pebble

Voyage Linux
(Debian based, derived from Pebble Linux)
How-to for VPN / Linux from the kernel up

AstLinux
(including Asterisk PBX)
Locustworld MeshAP

NetBSD
NetBSD
(latest version includes patches needed for WRAP)
OpenBSD
OpenBSD

WRAP for war driving...
(in German)
Commercial:
StarOS

Ikarus OS

MITC MeshAP for Willox

Wisper MeshAP adaptation

Qorvus Qcode™

參考資料
http://www.itpub.net/thread-347645-1-1.html
http://www.router.net.cn/Soft/List_141.html
http://bbs.m0n0china.org/forumdisplay.php?fid=22
http://bbs.routerclub.com/forum-12-1.html

2011年5月9日 星期一

我的 Goolg 帳號?好像被攻擊ㄌ

今天下午?

要登入查看「HR-NO」2011年 5 月 10 日的文章發佈!

卻無法檢視「文章內容」,而呈現出上面圖片...........

然後開始檢查「作業系統、瀏覽器」確定我沒有中毒,更沒有木馬入侵!

包涵作業系統,我都備份主資料,還原.....主系統,重新安裝各種工具後?


又在經過一輪「測試」後?

發現了,問題所在!


原因是「Java Script」遭到封鎖!











Blogspot 發現載入 Java Script 異常

訊息服務未能正常「 http://www.google.com/ig/ifpc.js 」呈現封鎖狀態

因此?

以前 Google 發生過;這種問題,原因是「金盾防火牆」阻擋!

(PS.「金盾防火牆」是世界上,全球最大的防火牆系統!)

但是 Dark Man 不是在「中華人民共和國」的領土上網!

「中華民國在台灣」應該............不會搞這套吧!

難道 WHA 才剛宣佈 12 小時不到?網路就已經開始「金盾工程 : 中國化」嗎?




.

2010年12月1日 星期三

CD router 路由軟體(6)防火牆

打從 linux 存在以來?

似乎沒有內建過其他 firewall ,一直都是 iptables 當家?或以「firewall」為主修改條件!

反觀「Free BSD」就有「 ipfw、ipnat、ipfilter」有幾大類專屬指令,也讓 freebsd 在設置上,變得輕鬆?

不管,反正是以 iptables 為主,沒其他問題!

國內除了鳥哥之外?「Linux 講解的一個好站!」

有詳細說明「iptables 的指令參數」要好好看ㄉ
http://www.weithenn.org/cgi-bin/wiki.pl?IPTables-Linux_Firewall
鳥哥的防火牆
http://linux.vbird.org/linux_server/0250simple_firewall.php
藍天工作室,過程非常完整唷!
http://itzone.hk/article/index.php?tid=14


先說明一些網路上看到的實用用技巧!
http://metavige.blogspot.com/2008/06/firestarter-iptables.html 


先是[ -F -X -Z ]清除預設防火牆原則

iptables -F
iptables -X
iptables -Z



設置允許公用 -P 訊息 「三個生效原則」

iptables -P INPUT DROP                     「進入消除」
iptables -P OUTPUT ACCEPT           「送出允許」
iptables -P FORWARD ACCEPT      「轉發允許」


設置 Loopback 的進出允許

iptables -A INPUT -i lo -j ACCEPT

設置各網路卡「eth0 | wlan0 | vmnet1 | vmnet8」生效的方式,用「替代字元 $ifcards」這招很讚!直接解決問題。

ifcards="eth0 wlan0 vmnet1 vmnet8"
for ifcard in $ifcards
do

建立 $ifcard 網路卡的連線生效

iptables -A INPUT -i $ifcard -m state --state RELATED,ESTABLISHED -j ACCEPT
done



回想關於鳥哥的硬體設置方式

EXTIF="eth1"           # 這個是可以連上 公用 IP 的網路介面
INIF="eth0"               # 內部 LAN 的連接介面;若無請填 ""
INIF="eth1"               # 內部 LAN 的連接介面;若無請填 ""
INIF="eth2"               # 內部 LAN 的連接介面;若無請填 ""

INNET="192.168.1.0/24"       # 內部 LAN 的網域,若沒有內部 LAN 請設定為 ""
export EXTIF INIF INNET       # 執行生效


-------------------------------------------------
CD router - iptables 設置 注意事項
-------------------------------------------------


我們要在 CD router 設置自己的 iptables 防火牆,為此?要先有一點步驟!

A.檢查網路結構

建議順序是「網路卡、外網、內網、路由表」設置是否生效,若未生效?就重新設置。


B.問題的根源,你有幾個網路通道,要開啟?

iptables 情況下?每多增加一張網路卡,就必須要多設置一種條件嗎?
iptables 環境下?每一個訊息正常訊息,什麼是「目標對象、目標來源、目標結果」的執行。

C.其他詭異問題?當設備不存在時,啟動 iptables 就不在管理當中?

案例:啟動 iptables 完成,在進行 re-pppoe-start 連線 ADSL 是否會正常?
答案:ppp+ 會被 iptables 排除在外,因此要先啟動 ADSL 在啟動「iptables」很這是很多人架設「IP分享」失敗的關鍵。


D.關於echo 1 > /proc/sys/net/ipv4/ip_forward 的迷失 NAT 技巧?


設置外網裝置eth0 10.1.1.1 對內廣播
同時設置
dhcpd 10.1.1.1
gw 10.1.1.1

即可經由 eth0 連線外網,但仍要說「這不安全」。
網路上已經有人說明過這種現象,因此?一般市面售出的「 IP 分享器」都有同樣的缺陷。
不論內建任何「簡易防火牆原則」,也都難以不被透析內部網路。

現象證明1;取自藍森林 自由軟件「http://www.lslnet.com/linux/f/docs1/i28/big5227931.htm」
-------------------------------------------------------------------------

用linux做NAT最後都要用上面一句話打開ip轉發。

昨天做了個實驗無意中發現,這個好像不是我想的那樣工作的。
1,本來是想做NAT的,但是忘了加iptables,只
 

echo 1 > /proc/sys/net/ipv4/ip_forward了
 

網關eth0 192.168.0.10  |  eth1 192.168.1.1
 

eth0連到公司網絡,相對來說是外網了(192.168.0.0/24),eth1連到我們這個部門,相對來說是內網了 (192.168.1.0/24)沒有加Iptables當然不能出去了,但是我發現,內網可以訪問外網的一台機器 192.168.0.31,ping,telnet,ftp都可以,其他外網機器不能訪問!!!,現在沒有做任何iptables啊,為了確信沒有 iptables,我iptables -t nat -F,清了一次,還是可以通,不能理解!!!
 

乾脆我到192.168.0.31上,試著ping 192.168.1.X內網的機器,居然是通的,各種服務都可以!!!這還有什麼安全性可言啊。檢查192.168.0.31的設置,發現它的 default gw 是192.168.0.10,我猜想是不是ip_forward,打開以後就分別轉發來自兩個端口的包?
 

2,加了iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE以後,NAT正常,外網機器都能訪問,只是只要外網以192.168.0.10做缺省路由,就可以自由訪問內網任何機器了,不需要什麼端口映射了。 

到這裡我覺得這樣是不是有些不安全,假如,通過這樣一個NAT放在公網上,只要別人與你的公網IP在一個網段,以你的NAT公網IP為缺省路由,不是內網全部暴露在它面前了?


-------------------------------------------------------------------------

-------------------------------------------------------------------------
現象證明2「http://lists.debian.org/debian-firewall/2000/01/msg00021.html


其中有一篇關於「ip_forward」內外網區隔的原文敘述,在原意上?

條件近似

dns192.168.1.1
mask 255.255.255.0
gw 192.168.1.254
dhcpd broadcast 192.168.1.255

會發生「 111.112.113.114 」的原理是什麼?重新計算路由又會改變條件,使人不得不思考,正確的配置是什麼?

通常很多人喜歡「預設配置」gw = dhcpd 的現象,來接通外部網路,在比照「大型網路、企業網路、網管技術」的實現上?這非常不安全。

因此?建立 proxy 伺服器,來避免這個不安全,轉移網路不安全的焦點。
不禁使人問「proxy = 網路代理伺服器」是安全的嗎?

曾在 2002、2004、2005、2007年,申請多組免費伺服器,架設多台「虛擬 proxy 」作為跳板,完成一些有趣的模式,可見得網路上的免費資源?非常好用,而且可匿名登記,只要E-mail檢查過關即可(免費 email 許多地方都能申請到),至於網路流量?就要自己「多方」設法解決。

但若真的要「偷懶」 dhcpd = gw 也無不可啦!

因此可以獲知「eth1」「dhcpd server router=192.168.1.1 廣播 192.168.1.255」
但設置「eth0\pppoe\ADSL」取得外網「gw 214.21.18.50」不合理。

因此?
#router  default gateway "eth0 ppp+ adsl+ isdn+" 一類的設備窗口

要有效管理「Router」作正確規劃?
因此 default gateway 仍是內部虛設的條件?
一切採取「網路卡實體」來區分,實體設置交換網路訊息................

http://eoffice.im.fju.edu.tw/phpbb/viewtopic.php?t=1550 「不解的新手請閱覽」

-------------------------------------------------------------------------


請參考

Red Hat Enterprise Linux 4 的線上教程,去進行施作,並確保上面描述的過程,各位就能夠體會 iptables 操作技巧了。

紅帽企業版 Linux 4 第七章 「防火牆」

請詳盡的看完第七章節全部
http://web.mit.edu/rhel-doc/4/RH-DOCS/rhel-sg-zh_tw-4/ch-fw.html
若沒有問題?就去挑戰「鳥哥」的防火牆設置模式。
-------------------------------------------------------------------------


鳥哥的防火牆設置
http://linux.vbird.org/download/ 有鳥哥防火牆 firewall 文件,可以下載來參考!


#!/bin/bash

# 請先輸入您的相關參數,不要輸入錯誤了!
EXTIF="eth1" # 這個是可以連上 Public IP 的網路介面
INIF="eth0" # 內部 LAN 的連接介面;若無請填 ""
INNET="192.168.1.0/24" # 內部 LAN 的網域,若沒有內部 LAN 請設定為 ""
export EXTIF INIF INNET

# 第一部份,針對本機的防火牆設定!###########################
# 1. 先設定好核心的網路功能:

echo "1" > /proc/sys/net/ipv4/tcp_syncookies
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
for i in /proc/sys/net/ipv4/conf/*/rp_filter; do
echo "1" > $i
done
for i in /proc/sys/net/ipv4/conf/*/log_martians; do
echo "1" > $i
done
for i in /proc/sys/net/ipv4/conf/*/accept_source_route; do
echo "0" > $i
done
for i in /proc/sys/net/ipv4/conf/*/accept_redirects; do
echo "0" > $i
done
for i in /proc/sys/net/ipv4/conf/*/send_redirects; do
echo "0" > $i
done

# 2. 清除規則、設定預設政策及開放 lo 與相關的設定值
PATH=/sbin:/usr/sbin:/bin:/usr/bin; export PATH
iptables -F
iptables -X
iptables -Z
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state RELATED -j ACCEPT

# 3. 啟動額外的防火牆 script 模組 
# 3. iptables.deny | iptables.allow 檔案請到 http://linux.vbird.org/download/ 下載  
 
if [ -f /usr/local/virus/iptables/iptables.deny ]; then
sh /usr/local/virus/iptables/iptables.deny
fi
if [ -f /usr/local/virus/iptables/iptables.allow ]; then
sh /usr/local/virus/iptables/iptables.allow
fi
if [ -f /usr/local/virus/httpd-err/iptables.http ]; then
sh /usr/local/virus/httpd-err/iptables.http
fi
iptables -A INPUT -m state --state ESTABLISHED -j ACCEPT

# 4. 允許某些類型的 ICMP 封包進入
 
AICMP="0 3 3/4 4 11 12 14 16 18"
for tyicmp in $AICMP
do
iptables -A INPUT -i $EXTIF -p icmp --icmp-type $tyicmp -j ACCEPT
done

# 5. 允許某些服務的進入,請依照您自己的環境開啟
# iptables -A INPUT -p TCP -i $EXTIF --dport 22 -j ACCEPT # SSH
# iptables -A INPUT -p TCP -i $EXTIF --dport 25 -j ACCEPT # SMTP
# iptables -A INPUT -p UDP -i $EXTIF --sport 53 -j ACCEPT # DNS
# iptables -A INPUT -p TCP -i $EXTIF --sport 53 -j ACCEPT # DNS
# iptables -A INPUT -p TCP -i $EXTIF --dport 80 -j ACCEPT # WWW
# iptables -A INPUT -p TCP -i $EXTIF --dport 110 -j ACCEPT # POP3
# iptables -A INPUT -p TCP -i $EXTIF --dport 443 -j ACCEPT # HTTPS

# 第二部份,針對後端主機的防火牆設定!##############################
# 1. 先載入一些有用的模組

modules="ip_tables iptable_nat ip_nat_ftp ip_nat_irc ip_conntrack
ip_conntrack_ftp ip_conntrack_irc"
for mod in $modules
do
testmod=`lsmod | grep "${mod} "`
if [ "$testmod" == "" ]; then
modprobe $mod
fi
done

# 2. 清除 NAT table 的規則吧!
iptables -F -t nat
iptables -X -t nat
iptables -Z -t nat
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT

# 3. 開放成為路由器,且為 IP 分享器!
if [ "$INIF" != "" ]; then
iptables -A INPUT -i $INIF -j ACCEPT
echo "1" > /proc/sys/net/ipv4/ip_forward
if [ "$INNET" != "" ]; then
for innet in $INNET
do
iptables -t nat -A POSTROUTING -s $innet -o $EXTIF -j MASQUERADE
done
fi
fi
# 如果你的 MSN 一直無法連線,或者是某些網站 OK 某些網站不 OK,
# 可能是 MTU 的問題,那你可以將底下這一行給他取消註解來啟動 MTU 限制範圍

# iptables -A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -m tcpmss \
# --mss 1400:1536 -j TCPMSS --clamp-mss-to-pmtu

# 4. 內部伺服器的設定:
# iptables -t nat -A PREROUTING -p tcp -i $EXTIF --dport 80 \
# -j DNAT --to 192.168.1.210:80
 
 
 
後面開始?就是其他「軟路由軟體」 的實務架設。

2010年11月29日 星期一

CD router 路由軟體(5)安全

初步安全設定,很多人說過「tcp wrapper」這是非常簡單的工具,又容易設定。
用來阻擋「服務、軟體」從網路進入電腦,進行寫入、讀取、執行。

 設定CDrouter 的 tcp wrapper 也會用到「古老 vi 版本」

設置檔案
/etc/{ hosts.allow  |  hosts.deny }

/etc/hosts.allow
telnets:all
sshd:192.168.*/24 www.hinet.net .liferec.net
ALL:192.168.2.0/24
mysqld:192.168.2.60/24

/etc/hosts.deny
all:root:root


說明 /etc/hosts.allow
telnets:all
「允許網路服務從 telnets 進入」
sshd:192.168.*/24 www.hinet.net .liferec.net
針對SSH連線服務
「僅允許192.168.0/24的電腦登入SSH連線」
「允許來自網域 www.hinet.net 」
「允許來自第二層網域 .liferec.net 的呼叫」
ALL:192.168.2.0/24
「只讓網段 192.168.2.0/24 電腦登入服務」
mysqld:192.168.2.60/24
「只讓192.168.2.60/24 的電腦進入mysql服務」


說明 /etc/hosts.deny
all:root:root
「拒絕 root 帳號.群,從任何網路服務登入」



「tcp wrapper」簡單好用容易理解!

下次就是真正的防火牆「iptables」這東西,我對他又愛又恨已久!

CD router 路由軟體(4)內網

這是中央研究院 86 年10月13號的文章,關於網路配置.....

這篇關於DHCP生效,一定要看,才會知道DHCP怎樣產生功能。
這篇關於大家極少提起的 class D 運用,我以前只認為「Class D」只會用來結束定址,並且使得 NetBIOS 能夠 CAST,看過這篇文章後?有比較不同的啟發。

---------------------------------------------------------------------------------


分配內部網路的方式?


# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 08:00:27:B5:30:CB
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0


#ifconfig eth1 192.168.2.1 netmask 255.255.255.0 broadcast 192.168.2.255 up
# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 08:00:27:F9:EF:BC
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0

#ping 192.168.2.1 測試網卡是否互通


PING 192.168.2.1 (192.168.2.1): 56 octets data

64 octets from 192.168.2.1: icmp_seq=6 ttl=64 time=0.0 ms
64 octets from 192.168.2.1: icmp_seq=7 ttl=64 time=0.0 ms
64 octets from 192.168.2.1: icmp_seq=8 ttl=64 time=0.0 ms
64 octets from 192.168.2.1: icmp_seq=9 ttl=64 time=0.0 ms
^C

--- 192.168.2.1 ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max = 0.0/0.0/0.0 ms



設置 dhcpd 服務範圍
老舊的 VI 指令參考,這內建的 VI 非常古老,不易操作!
若遇到困擾 http://linuxxd.blogspot.com/2010/11/vi.html 先閱讀兩次,因為三年前第一次操作 CDrouter 時,這個 vi 快要讓我暈倒!



#vi /etc/dhcpd.conf
----------------------------------------------------------------------------------------
# dhcpd.conf
#
# Configuration file for ISC dhcpd (see 'man dhcpd.conf')
#

「截灣取直」

subnet 192.168.1.0 netmask 255.255.255.0 {  range 192.168.1.50 192.168.1.150; }
修改為
subnet 192.168.2.0 netmask 255.255.255.0 {  range 192.168.2.50 192.168.2.150; }
subnet 10.10.10.0 netmask 255.255.255.0 {  range 10.10.10.50 10.10.10.150;  }


ddns-update-style ad-hoc;
option domain-name "demo-cdrouter.com";
option domain-name-servers 192.168.1.1;
option subnet-mask 255.255.255.0;
option routers 192.168.2.255;
option routers 10.10.10.1;
allow bootp;
allow booting;
option time-servers 192.168.2.1;
----------------------------------------------------------------------------------------

指令檢測
#dhcpd -t 檢測設定文件
#dhcpd -T 檢測網路部署

若有錯誤?將 DHCPD.CONF 編輯到正確為止,一定會有講「這跟沒說一樣」。

這是國立竹北高中的文章
足夠參考來解決問題!

#dhcpd  閱覽DHCP租認及連線狀況

重點
Listening on Socket/eth1/192.168.2.0/24
「DHCP啟動監聽在 192.168.2.0/24 即 eth1 網卡對應之DHCP請求」
Sending on   Socket/eth1/192.168.2.0/24
「DHCP啟動租認給 192.168.2.0/24 即 eth1 網卡對應之DHCP租約」

下面這行在說明「192.168.1.1 = eth0」沒有分配 eth0 網卡的網路
No subnet declaration for eth0 (192.168.1.1).
** Ignoring requests on eth0.  If this is not what
   you want, please write a subnet declaration
   in your dhcpd.conf file for the network segment
   to which interface eth0 is attached. **

下面其他介紹DHCP 廠商********節省50餘字ㄅ

這樣就成功設定 DHCP 網路

再來要將 dhcp 限制在 eth1 = 192.168.2.0/24

#dhcpd eth1  這樣一來才不會發生DHCP伺服器呼叫「192.168.1.1 = eth0」也使用DHCP服務

這樣就完成了「內網 DHCP 」

檢查路由表

#router
產生一次
#router -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.1.1     0.0.0.0         UG    1      0        0 eth0

很清楚的看到「eth0」有外網同時為 gateway 設置 eth0 | eth1 也區隔開,並未發生關聯。

#brctl addbr br0
#brctl addif br0 eth0
#brctl addif br0 eth1
若有設定好 ADSL 就加上 brctl addif br0 ppp0 即可
#ifconfig br0 up
#brctl stp br0 on
 

這樣一來,內外網路,就通ㄌ........... 若是ADSL 就加上 brctl addif br0 ppp0即可

但 dhcpd.conf 當中 10.10.10.1  這是作什麼用?
這是 eth2 的小秘密,資訊人給自己運用的線路,若eth1 內部產生迴圈風暴?該怎麼辦?

從實體網路上,重新橋接每一條線路「Sw \ Hub」到 eth2來分辨風暴設備,因為目前針對風暴解決的設備很貴,另外架設RIP也是一種方式,但分辨起來?仍太繁複。

2010年11月27日 星期六

CD router 路由軟體(3)外網

「重點指令、路由參考」請參考「上次介紹過的網站」
 
簡述重點命令
ifconfig {interface} {up|down} {broadcast} {netmask} {network}的設置
router {add|del}{-host|-net}{ip}{netmask}的符合回應


初步入門「登入 WEBMIN 操作」

操作WEBMIN圖形介面,請開啟瀏覽器;
輸入「http://192.168.1.1:10000」若你沒有變更過localhost IP 的話!

WEBMIN請自己看「有圖有文」「 http://www.wifi.com.ar/english/cdrouter/shorewall-webmin.html 」(需要翻譯請找 google 翻譯)我就不多作講解。



下面是「Linux 演化」

一、設定 router硬體

檢查請參考「 http://www.wifi.com.ar/english/doc/configsave.txt.html 」


輸入指令「netconfig

1.設定 hostname 設定本機名稱「            」
2.設定 domain 設定伺服名稱「            」

3.出現三個設定項目
           static IP 固定IP設置
           DHCP   設定DHCP伺服器及網路卡
           Loopback 設定通信條件

4.設定 static IP



 hostname = 隨意
 domain     = 隨意
 ip add       = 固定 IP
gateway     = 網路匝道管理
Nameserver = 名稱伺服器(未設定 ADSL前,還無法正常。)

這是一個標準的網路設置過程「而我們只要設定 static IP 即可?」

以上的快速設定?並不是我們要得「技術」,因為這並不安全、更不嚴謹!



因此?請開始學習「指令介面」 當一個資訊界的好漢子,並且脫離「微軟的陰影」,成為沒有微軟圖形介面,你一樣能夠工作!

設置「網路介面」我有三張網路卡在「Vbox虛擬機器」

開始設置

#ip a   檢查 eth0 eth1 eth2 是否有設置IP位置
 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 08:00:27:b5:30:cb brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global eth0
inet6 fe80::a00:27ff:feb5:30cb/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
link/ether 08:00:27:f9:ef:bc brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
link/ether 08:00:27:ed:bd:d7 brd ff:ff:ff:ff:ff:ff
 
#router -n 檢查 eth0 eth1 eth2 是否有設置路由
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 1 0 0 eth0
 
根據{ip a}{router -n}所顯示尚未設置「eth1 eth2」兩張網路卡,
包涵 eth0 在內,都重新設定(我們要當高手,不要用WEBMIN)。
 
DarkMan自己的網管主機「192.168.100.*/16」因此,重新分配網路位置給 CDrouter 虛擬主機。
第 1 張網路卡 eth0 (系統預設 192.168.1.1)
 
#ifconfig eth0 192.168.100.201
 
檢查router 有否加入 eth0 網段的變化,若未加入,則寫入
#route del -net 192.168.1.1 netmask 255.255.255.0 eth0 刪除
#route add -net 192.168.100.201 netmask 255.255.255.0 eth0 新增
 
第 2 張網路卡 eth1(分配出 10.1.1.* 網段的IP)
 
#ifconfig eth1 10.1.1.5
檢查「路由表」是否多了 10.0.0.0 class A 網段(若你爽的話,可虛擬出class A B C)
 
第 3 張網路卡 eth2 
#ifconfig eth2 200.210.220.1 netmask 255.255.255.0 產生出一個 class C 的網路
#router -n
 
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth1
200.210.220.0   0.0.0.0         255.255.255.0   U     0      0        0 eth2 
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo   
 
這樣就算完整了嗎?
外部網路 class C = eth0
內部網路 class A = eth1
臨時線路 class C = eth2
網路核心 LOOPBACK = lo
#ping 192.168.100.* 任何 IP 均能正常回應,才算 eth0 成功?
但這樣並不成立「IP192.168.100.*/NM0.0.0.0 NW168.95.1.1」
仍不能讓 eth1 | eth2 能經由 eth0 訪問外部網路。
 
開始設置「ADSL連線:外部網路」若為「Cable 網路用戶」
請將 eth0 網路卡設定為 Cable上網參數即可。
原文參考 http://www.wifi.com.ar/english/doc/README.txt.html
 
檢查指令
 
#find / | grep adsl (我們後續要用的指令)
/usr/sbin/adsl-connect
/usr/sbin/adsl-setup
/usr/sbin/adsl-start
/usr/sbin/adsl-status
/usr/sbin/adsl-stop
 
#find / | grep ppp- (可以看到 WEBMIN 的命列工具)
/usr/sbin/ppp-go
/usr/sbin/ppp-off
/usr/sbin/ppp-on
/usr/sbin/ppp-stop
/etc/webmin/ppp-client
/etc/webmin/ppp-client/config
/etc/webmin/ppp-client/admin.acl
開始設定 ADSL 環境
#adsl-setup(可參考 - 鳥哥
# adsl-setup (輸入指令,開始文字設定敘述。)

Welcome to the Roaring Penguin ADSL client setup. First, I will run
some checks on your system to make sure the PPPoE client is installed
properly...

Looks good! Now, please enter some information:

USER NAME

>>> Enter your PPPoE user name (default 88888@hinet.net):←輸入ADSL帳號

INTERFACE

>>> Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethn, where 'n' is a number.
(default eth0): ←輸入預設網路卡編號

Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
>>> Enter the demand value (default no): ←建議預設值 NO

DNS

Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
>>> Enter the DNS information here: 168.95.1.1 ←輸入ISP公司的 DNS IP
Please enter the IP address of your ISP's secondary DNS server.
If you just press enter, I will assume there is only one DNS server.
>>> Enter the secondary DNS server address here: 168.95.192.1 ←輸入ISP公司的 DNS IP

PASSWORD

>>> Please enter your PPPoE password:←輸入ADSL帳號密碼
>>> Please re-enter your PPPoE password:←重複輸入第二次

FIREWALLING

Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.

The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
>>> Choose a type of firewall (0-2): 0 建議為 2 然後修改你要得「防火牆設置」

** Summary of what you entered **

Ethernet Interface: eth0
User name: 88888@hinet.net
Activate-on-demand: Yes; idle timeout = yes seconds
Primary DNS: 168.95.1.1
Secondary DNS: 168.95.192.1
Firewalling: NONE

>>> Accept these settings and adjust configuration files (y/n)? y ←ADSL 就會啟動了

#ping 168.95.1.1 測試ISP DNS是否回應
如果你不想ADSL-SETUP設定?
想要編輯參數檔案。
下面有幾個檔案,你就要多去瞭解。

#cat /etc/ppp/chap-secrets  檢查 ADSL帳號密碼                            
"88888@hinet.net"       *       "123456"                                               

#cat etc/ppp/options.dialup 檢查Linux ADSL - PPPD 服務是否對應 router 路由表

(若為其他不同的 Linux 則 PPPD 會在不同的設定資料夾)

# General configuration options for PPPD:                                       
lock                                                                                                                  
defaultroute            (ADSL 轉為預設 router GW )                        
noipdefault             (極為重要)                                                        
modem                   (極為重要)                                                       
/dev/ttyS0                                                                                              
57600                                                                                                    
crtscts                                                                                                   
# Uncomment the line below for more verbose error reporting:
#debug
# If you have a default route already, pppd may require the other side
# to authenticate itself, which most ISPs will not do.  To work around this,
# uncomment the line below.  Note that this may have negative side effects
# on system security if you allow PPP dialins.  See the docs in /usr/doc/ppp*
# for more information.
noauth                           不自動啟動   
passive                         觸動上網模式
asyncmap 0                 異地同步地圖
name "brujula"           「 brujula 」似乎是這個版本的擬人名稱,我也不清處brujula是誰,但網路上可以查到一個 linux 有一位 LA brujula 的名字。



設定完文字檔案後?

# adsl-start  啟動 ADSL撥接服務


設定外部上網連線說明完畢!

下一節?就玩玩「內部網路設置 DHCP 服務器」






補註: ADSL-SETUP Firewall 另外一項要訣:

The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
>>> Choose a type of firewall (0-2):
 
建議,你若有「編輯好的 NAT、DNAT、SNAT、reles」可以將內容先寫入「/etc/ppp/」兩個檔案之一,並且將「設定外部網路連線,留在最後設定,來避免「網路佈署」內外網路無法連線。

目錄
/etc/ppp/

檔案
firewall-masq

firewall-standalone

這個兩個檔案?作用上很方便,可以用來改變許多問題。


但在 CDrouter 真正的防火牆文件設置在「/etc/rc.d/rc.firewall.*」共有兩個檔案



個人錯誤糾正 20101129 發現錯誤
「close = class」用錯英文,因為打字打得過於迅速?毫無知覺下,就發文ㄌ

HR , NO!Human Resources,NO!

※※ 這樣內容,上手會困難嗎?※※ 我想到什麼?就寫什麼!※※

※對於資訊!我想到什麼?就寫什麼!

如果困難的話?
歡迎來信討論或發表意見,我會儘快回覆。

也歡迎來 YAHOO 知識家,集思廣益!

我的YAHOO 知識家 首頁:
Yahoo 知識+ 2013年改版前 (網域似乎已作廢)
YAHOO 知識家+ 2013年改版後

有需要技術文件 DarkMan 蒐集了不少!
存在FTP共享。想下載?請洽DarkMan信箱取得下載帳號。※

上句:不修一切法,如如是己身。傳其法,授其使,說其名,淪為其用。
下句:你寫得出來其意就傳你【大神威、大魔法,無上魔道。】