Search Options
close
Search the following clips:
All Clips
Everyone's Clips
My Guides
Sign Up
Install
Learn More
Login
b2d的ssh外部連線設定
hcchen2u
follow
0
7-15-2008 10:18 AM
82 views
tags:
linux
Add a Comment
Login
to Comment. Not a member yet?
Sign up
Related Clips
Google Chrome "about:" Easter Eggs!
Google Chrome is here
Chrome Browser - Google Gladiator
Who's Behind Anti-Palin Smear Site?
How to: Install a Debian/Ubuntu package (....
7 "must read" Linux tutorials
Ubuntu: enable USB device in Virtualbox
More clips from
hcchen2u
soundscape - blog
key-遠端桌面設定
b2d的ftp外部連線設定
Today's Top Clips
"Artwork inspired by the mysteries and marvels of science." wonderful images
Gait may be associated with orgasmic ability
Physicists investigate how time moves forward
Late-Night Jokes about Republican Vice Presidential Candidate Sarah Palin
24 of the most peculiar creatures known to mankind.
Brave New World of Digital Intimacy
"The Road Goes On Forever and the party never ends.." beautiful "path" picture
Engineering Students
Brain and Creativity Institute
Zen training speeds the mind's return after distraction, brain scans reveal
visit the
Top Clips page
View the Top Clips from
July 15, 2008
Embed This Clip In Your Site...
<div style="margin: 12px 0px; font-family: arial; color: #333333; background: #ffffff; border: solid 4px #e5e5e5; width: 100%; clear: left;"><div class="CM_CTB_Content_Wrap" style="margin: 0px; padding: 0px;background-color: #ffffff;"><div style="border-bottom: solid 1px #dcdcdc; white-space: nowrap; margin-bottom: 8px; background-color: #eeeeee ;background-image: url(http://www.clipmarks.com/images/source-bg.gif); background-repeat: repeat-x; height: 24px; line-height: 24px; vertical-align: middle; padding-bottom: 4px; color: #666666; font-size: 10px;" ><a href="http://clipmarks.com/clip-to-blog/" title="see clips that are hot right now"><img src="http://content.clipmarks.com/blog_embed/3adc444c-6f67-4aac-8732-d12677d9eb91/2F31BD3C-4167-4FE8-B27D-45269D410DBF/" alt="" width="19" height="19" border="0" style="vertical-align: middle; margin: 0px 4px; display: inline; border: none; float:none;" /></a>clipped from <a title="http://faq.serverdiy.org/simple/index.php?t40.html" href="http://faq.serverdiy.org/simple/index.php?t40.html" style="font-size: 11px;">faq.serverdiy.org</a></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://faq.serverdiy.org/simple/index.php?t40.html"><table background="undefined" bgcolor=""><tr><TD bgcolor="#ffffff"><B><A href="http://faq.serverdiy.org/simple/index.php?">ServerDIY </A> -> <A href="http://faq.serverdiy.org/simple/index.php?f6.html">B2D Linux 免費方案</A> -> <A href="http://faq.serverdiy.org/simple/index.php?t40.html">如何允許由各地連入 22 port 操作 ssh ?</A></B> </TD></tr></table></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://faq.serverdiy.org/simple/index.php?t40.html"><DIV> server 嘛,就是希望能夠從遠端操作,偏偏 b2d 預設只允許同網段進入 ssh 操作,什麼叫同網段? 就是只能在內部,假設 server 是 192.168.0.50 / 24 ,則所有 192.168.0.1 ~ 192.168.0.254 的主機都允許連入 server 的 ssh 22 port。</DIV></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://faq.serverdiy.org/simple/index.php?t40.html"><DIV>書上這樣寫著,請編輯 /etc/init.d/rc.local 檔,所以我先在內部的其他電腦 192.168.0.200的主機(這是我的 windows ,用 putty 軟體連線 ssh 登入 B2D後,用 vi 打開 rc.local 檔)</DIV></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://faq.serverdiy.org/simple/index.php?t40.html"><DIV>找到這幾行後,如下,第一行是我加上去的:</DIV></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://faq.serverdiy.org/simple/index.php?t40.html"><FONT color="red">$IPTABLES -A INPUT -p tcp -s 0.0.0.0/0 --dport 22 -j ACCEPT</FONT></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://faq.serverdiy.org/simple/index.php?t40.html">$IPTABLES -A INPUT -p tcp -s 192.168.0.0/24 --dport 22 -j ACCEPT<BR />$IPTABLES -A INPUT -p tcp -s 127.0.0.1 --dport 22 -j ACCEPT<BR /><DIV>$IPTABLES -A INPUT -p tcp --dport 22 -j DROP</DIV></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://faq.serverdiy.org/simple/index.php?t40.html"><DIV>然後,再下一行指令</DIV></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://faq.serverdiy.org/simple/index.php?t40.html"><DIV>#/etc/init.d/rc.local 按下 enter </DIV></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://faq.serverdiy.org/simple/index.php?t40.html"><DIV>讓防火牆重新生效即可</DIV></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://faq.serverdiy.org/simple/index.php?t40.html"><DIV>tcp -s 0.0.0.0/0 這一行代表所有的 ip,如果您只要設定你家的ip,您可以寫 tcp -s 61.66.122.12</DIV></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://faq.serverdiy.org/simple/index.php?t40.html">我是假設 61.66.122.12 是你家ip哦,你不要照抄哦,不然你會昏倒,怎麼弄都弄不出來,呵~</blockquote></div><div style="margin: 0px 6px 6px 4px;"><table style="font-size: 11px;border-spacing: 0px;padding: 0px;" cellpadding="0" cellspacing="0" width="100%"><tr><td style="background:transparent;border-width:0px;padding:0px;"> </td><td align="right" style="background:transparent;border-width:0px;padding:0px;width:107px" width="107"><a href="http://clipmarks.com/share/2F31BD3C-4167-4FE8-B27D-45269D410DBF/blog/" title="blog or email this clip"><img src="http://content7.clipmarks.com/images/c2b-foot.png" border="0" alt="blog it" width="107" height="17" style="border-width:0px;padding:0px;margin:0px;" /></a></td></tr></table></div></div>
Clipmarks
Home
New Clips
Top Clips
Dashboard
Popular Topics
News
Life
Science
Technology
Entertainment
Get Started
Sign Up
Install Clipping Tool
How Clipping Works
Clip-to-Blog™
ClipSearch
Tools and Resources
FAQ
ClipWeek
Top Clippers
Top Tags
Site Map
About Clipmarks
About Us
Contact
Blog
Copyright
Privacy
EULA
OK