• 860

[研究所] MikroTik RouterOS 學習 (持續更新)

imhd wrote:
於是我將我的RB450G reset 到 default, 再重新設定...(恕刪)


1.進去dhcp-client 刪除裡面的設定.
2.把防火牆的的 nat 裡面的ip偽裝(masquerade)這一個的out-interface選項取消.

以上

imhd wrote:
但奇怪的是, 就是ping不出去!
於是我試著 ping 我的 PPPoE Client 這個 interface 的 gateway, 卻又ping到!
這到底是什麼狀況???...(恕刪)


RG450G 我已經不記得它 reset config 後是否會載入預設的設定檔 (ps:印象中好像更新到幾版之後就會有內建一些基本的設定).

建議你下次要反應問題時, 將你的設定檔匯出 (export command), 並把 pppoe 帳號密碼改掉後貼上來, 不然光是你這樣的描述, 只有神人才有辦法隔空抓藥.
FB: Pctine

pctine wrote:
RG450G 我已經...(恕刪)



Sorry前輩:
RB450G reset後, 會有一組default的設定值,
我剛剛試了一下, 當我的PPPoE Client這個interface在設定時, 若無勾選"Use Peer DNS", 就可順利上網....
可是不應該是這樣的!

以下是我的設定檔, 請各位前輩幫我看看, 是不是哪裡設定錯誤!
0 name="myback.rsc" type="script" size=2 597 creation-time=jan/02/1970 00:58:12
contents=
# jan/02/1970 00:58:09 by RouterOS 5.26
# software id = LT1I-KJCQ
#
/interface ethernet
set 0 name=ether1-gateway
set 1 name=ether2-master-local
set 2 master-port=ether2-master-local name=ether3-slave-local
set 3 master-port=ether2-master-local name=ether4-slave-local
set 4 master-port=ether2-master-local name=ether5-slave-local
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether1-gateway name=\
pppoe-out1 password=XXXXXXX user=XXXXXXX
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=ether2-master-local nam>
default
/ip address
add address=192.168.88.1/24 comment="default configuration" interface=\
ether2-master-local
/ip dhcp-client
add comment="default configuration" disabled=no interface=ether1-gateway
/ip dhcp-server lease
add address=192.168.88.2 mac-address=00:08:9B:D3:FD:23
add address=192.168.88.4 mac-address=00:08:9B:D3:FD:24
/ip dhcp-server network
add address=192.168.88.0/24 comment="default configuration" dns-server=\
192.168.88.1 gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes servers=61.31.233.1,61.31.1.1
/ip dns static
add address=192.168.88.1 name=router
/ip firewall filter
add chain=input comment="default configuration" protocol=icmp
add chain=input comment="default configuration" connection-state=established
add chain=input comment="default configuration" connection-state=related
add action=drop chain=input comment="default configuration" in-interface=\
ether1-gateway
add chain=forward comment="default configuration" connection-state=\
established
add chain=forward comment="default configuration" connection-state=related
add action=drop chain=forward comment="default configuration" \
connection-state=invalid
/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" \
out-interface=ether1-gateway
add action=masquerade chain=srcnat src-address=192.168.88.0/24
/ip neighbor discovery
set ether1-gateway disabled=yes
/tool mac-server
add disabled=no interface=ether2-master-local
add disabled=no interface=ether3-slave-local
add disabled=no interface=ether4-slave-local
add disabled=no interface=ether5-slave-local
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes
add interface=ether2-master-local
add interface=ether3-slave-local
add interface=ether4-slave-local
add interface=ether5-slave-local

imhd wrote:
Sorry前輩:RB...(恕刪)

沒錯啊,跟#1330樓敘述的一樣...
imhd wrote:
Sorry前輩:RB...(恕刪)



1.進去dhcp-client 刪除裡面的設定.
2.把防火牆的的 nat 裡面的ip偽裝(masquerade)這一個的out-interface選項取消.


/ip dhcp-client
add comment="default configuration" disabled=no interface=ether1-gateway

/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" \
out-interface=ether1-gateway
YAWPYNG wrote:
1.進去dhcp-client 刪除裡面的設定.
2.把防火牆的的 nat 裡面的ip偽裝(masquerade)這一個的out-interface選項取消.


YAWPYNG wrote:
/ip dhcp-client
add comment="default configuration" disabled=no interface=ether1-gateway

/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" \
out-interface=ether1-gateway



太感謝各位大大了!
沒錯, 照著前輩的步驟去刪除這兩個rule就一切正常了!
真的非常感謝各位前輩的幫忙~

gfx wrote:
要是用戶會手動變更i...(恕刪)

小弟試過gfx兄您的方式,其方法如果照您po的文應該是把指定client端mac取得IP將其IP轉為白名單,但有個疑慮,當非IP白名單的使用者在假日值班時,只要IP白名單內的電腦沒有開機(沒用到IP),此時值班者便可以一個IP一個IP去試,試到可以上網的IP以後就自行指定該IP。所以小弟的做法是打算網際網路預設全部拒絕存取,只有mac白名單裡的人可以上網,這功能在一般d-link的分享器是存在的,只是router os設定的部份小弟還在摸索。目前只用IP方式的白名單,若能用mac方式的白名單或許更好。
ddk886 wrote:
小弟試過gfx兄您的...(恕刪)

所以白名單timeout的時間很重要啊, 越短越沒機會trying...

或者直接開第2組DHCP Server,
將兩種不同權限的用戶區分在不同的DHCP,說不定管理上會更容易.
firewall filter: MAC address white-list

ddk886 wrote:
小弟試過gfx兄您的...(恕刪)


這只是一些 firewall filter 應用的變化而已, 做法很多, 你可以自己去嘗試, 以下就是你指的一般 IP 分享器 mac address filter 的做法.


# 允許白名單上的 IP 上網
/ip firewall filter
add chain=forward comment="allow users in WhiteList" out-interface=pppoe-out1 \
src-address-list=WhiteList

# 特定 mac address 加入白名單
add action=add-src-to-address-list address-list=WhiteList \
address-list-timeout=1d chain=forward comment="White List: pctine" \
out-interface=pppoe-out1 src-mac-address=BC:5F:F4:56:53:23

# 特定 mac address 加入白名單...
add action=add-src-to-address-list address-list=WhiteList \
address-list-timeout=1d chain=forward comment="White List: DS1513+ NAS" \
out-interface=pppoe-out1 src-mac-address=00:11:32:11:66:41

# drop all
add action=drop chain=forward comment="Drop all" out-interface=pppoe-out1

FB: Pctine

pctine wrote:
firewall f...(恕刪)

感謝pctine及gfx大的指點,小弟再來進行測試~!!
  • 860
內文搜尋
X
評分
評分
複製連結
請輸入您要前往的頁數(1 ~ 860)
Mobile01提醒您
您目前瀏覽的是行動版網頁
是否切換到電腦版網頁呢?