配置OpenWRT 校园网实现 IPv4 over IPv6。 - XiZi's Blog
配置OpenWRT 校园网实现 IPv4 over IPv6。
目前网络状况:两个位置:位置1和位置2,位置1可以正常访问IPv6网络(校内和校外),位置2可以访问IPv6和IPv4网络。
目的:实现位置1处无差别上网,即正常访问IPv4和IPv6网络,关键是IPv4。
基本原理:通过openvpn路由所有的IPv4数据给远程电脑。
基础设施:位置1处路由器(mdir-615),位置2处做好路由和openvpn()监听IPv4和IPv6地址。
1、基础准备。配置位置2处的电脑,做好openvpn服务器,使用正常的客户端测试openvpn的连通性。网上教程很多,这里不做具体说明了。
2、路由的openwrt配置。这里使用我的DLink dir615 为例说明。
1)刷openwrt,这里需要提到一点,我的dir615刷openwrt,ie11和chrome都不能刷,下了个firefox4可以。
2)安装必备的软件包,由于我的dir615闪存只有4m,所以都不能安装图形界面,还有后面选择polarssl和popenvpn-polarssl,也是次原因,完全命令行操作。必备的软件包有: kmod-tun,liblzo,libpolarssl,openvpn-polarssl。
3)配置
(1)配置/etc/config/system
config system option hostname OpenWrt #路由器的名称 option timezone CST-8 #时区,这个就是Asia/Chongqing,也就是中国的时区。 config 'led' 'wlan_led' #这个是我的dir615配置无线led灯的 option 'name' 'WLAN' option 'sysfs' 'd-link:green:wlan' option 'trigger' 'netdev' option 'dev' 'wlan0' option 'mode' 'link tx rx' config 'led' 'wan_led' #段配置wan口led灯 option 'name' 'WAN' option 'sysfs' 'd-link:green:wan' option 'trigger' 'netdev' option 'dev' 'tun0' option 'mode' 'link tx rx'
(2)配置/etc/config/network
config interface 'wan' option ifname 'eth1' #指定wan口网卡 option proto 'none' #这个地方配置修改为none,我们不需要ipv4网络 option macaddr '00:24:01:76:B2:27' #这句指定wan口的mac地址。 config interface 'ovpn' #这段内容是我们增加的,为后续的防火墙做准备。 option ifname 'tun0' #openvpn使用的interface名称 option proto 'none' #这里也不用配置,他的网络是由程序配置的。
(3)配置/etc/config/firewall
#对wan区域增加我们配置的openvpn,ovpn我们上面刚配置的名字。 config zone option name wan list network 'wan' list network 'wan6' list network 'ovpn' #增加这一行把openvpn增加的wan区域里面,否则即使你连接上了,路由器可以正常上网,但局域网客户端不能上。 option input REJECT option output ACCEPT option forward REJECT option masq 1 option mtu_fix 1
(4)配置dns解析服务,这里我们修改/etc/dnsmasq.conf
#在文件尾部增加DNS服务器,越靠下优先级越高 server=2001:4860:4860::8844 # google ipv6 public dns server=2001:4860:4860::8888 # 同上 server=xxx.xxx.xxx.xxx # 学校IPv4 DNS
(5) 关于openvpn的配置,由于我们没有IPv4网络,redirect gateway回出现错误失效,我们手动添加路由即可。 /etc/config/openvpn
config openvpn sample_client # Set to 1 to enable this instance: option enabled 1 .... #插入以下段到你配置的openvpn client 配置部分 list route "0.0.0.0 0.0.0.0"
(6)顺便把无线的配置也贴出来吧。/etc/config/wireless
config wifi-device radio0 option type mac80211 option channel 11 option hwmode 11ng option path 'platform/ath9k' list ht_capab SHORT-GI-40 list ht_capab DSSS_CCK-40 option htmode HT20 # REMOVE THIS LINE TO ENABLE WIFI: # option disabled 1 #注意这里原来是没有前面那个#的 config wifi-iface option device radio0 option network lan option mode ap #无线工作模式,ap路由,sta客户端 option ssid myssid #OpenWrt #默认是OpenWrt改为你想要的名字 option encryption psk2 #none #默认是none改为你想要的加密方式,psk,psk2,wep等 option key password #当然是密码喽。
2020年9月20日 20:04
different opinions about a particular thing will for sure help others to learn. Similarly, de.altoconvertpdftoword.com gives a chance to learn the solutions of some problems. This eases their tasks and allow them to work smoothly.
2020年10月01日 22:38
HP Board 1st, 2nd, 3rd, 4th, 5th Syllabus 2021 A syllabus is a document that contains SCERT HP 2nd Class Syllabus important information about certain content. Typically, it interacts the students what exactly you are going to study during a particular period of time. Moreover, this is a necessity as well, as providing the length and breadth of HP Board 1st, 2nd, 3rd, 4th, 5th Syllabus not only clear a picture but also keeps the candidates to be ready ahead, before the actual demonstration of chapters.
2021年7月28日 04:50
I can say that Digitek is one of my go-to businesses when it comes to https://www.digitekprinting.com/poster-prints services. They give us customers the service that we deserve. In addition, their ink in every printing is very long lasting.
2021年9月03日 01:34
You need to be painfully specific with your targeting. Because random comments with promotional content is not commenting.
2021年9月27日 21:08
Kerala HSC Model Paper 2022 with answer solutions to practice with the regular mock test for (Onam & Orukkum) Quarterly, Halfyearly, Prefinal and Annual final Public examinations to the academic year of 2022, Class teacher of the college is also suggested lesson wise most important questions to every chapter of Arts, Science, and Commerce stream. Plus-1 Model Paper Kerala 2022 We have suggested to every DHSE and VHSE student can download all subject model question paper with old exam previous paper Pdf to guessing IMP questions for theory, objective.
2021年10月05日 19:26
it's to a great degree cool blog. Interfacing is incredibly profitable thing.you have really had any kind of effect 바카라사이트
2021年10月10日 06:21
Best Social Plan is the most trusted company for providing social media marketing services. Within some years it has gained popularity as a reliable company to its customers. This company is now managing its activity successfully. It is proved number one company by its quality services. It is noticed that more and more customers are showing their intention to take service from this company. Best Social Plan
2021年10月18日 18:55
The site is tenderly balanced and saved as much as date. So it should be, an obligation of appreciation is all together to offer this to us. АНУ -ын онлайн виз
2021年10月21日 23:38
An obligation of appreciation is all together for the informational and pleasing post, plainly in your blog everything is extraordinary.. sviluppo siti web Milano
2021年10月23日 06:12
Amaze! Just what exactly watch opener the following posting is to do. Significantly prized, saved as a favorite, I actually can’t bide time until extra!
2021年10月23日 21:27
In this specific article, you will see a synopsis, fulfill peruse this post. Procedura di richiesta del visto indiano
2021年10月23日 22:54
Terrific put up, attended on top not to mention saved your web sites. I just can’t hang around to study further because of most people.
2021年10月24日 00:12
I am keen on such themes so I will address page where it is cool depicted. برنامه ویزا کانادا آنلاین
2021年10月24日 02:47
This is extremely fascinating substance! I have altogether delighted in perusing your focuses and have arrived at the conclusion that you are ideal about a significant number of them. You are incredible. Rental Baby Roller
2021年10月26日 03:17
Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. sbobet
2021年10月26日 19:52
For what reason do just such a great amount of composed regarding this matter? Here you see more. 안전공원
2021年10月27日 19:09
Here at this site amazingly the basic material gathering so everybody can value an incredible arrangement. siti internet varese
2021年10月27日 19:34
RBSE 5th Important Question Paper 2022 in PDF format. Rajasthan's Board of Secondary Education (BSER) will hold a public examination for the DIET RBSE Class 5 Previous Question Paper 2022 BSER Matric Exam will be held in the month of March every year,with around 5 to 6 lakhs of students taking part in the exam each year. Rajasthan Board 5th Class Exam Dates are expected to be announced soon. BSER 5th Question Paper 2022 for All Subjects is available on this website. These questions are based on the BSER-recommended curriculum.
2021年10月28日 23:25
Thanks for the nice blog. It was very useful for me. I'm happy I found this blog. Thank you for sharing with us.I too always learn something new from your post. 사설토토
2021年11月01日 02:16
Really! Everything that a opener it blog post was for my situation. A great deal enjoyed, bookmarked, As i can’t look ahead to alot more!
2021年11月02日 18:37
I need to express profound gratitude to you. I have bookmark your site for future updates. bed bug traps
2021年11月02日 18:43
A debt of gratitude is in order for composing such a decent article, I bumbled onto your blog and read a couple of post. I like your style of composing... Anemometer
2021年11月02日 18:49
For this site, you will see our record, make sure to experience this information. ice skates
2021年11月02日 19:04
This is a great post I seen because of offer it. It is truly what I needed to see seek in future you will proceed after sharing such a magnificent post. bungee cords
2021年11月02日 19:11
Gee… I translate writes on a similar to issue, be that as it may I never went by your blog. I added it to populars additionally i'll be your reliable preliminary. tool belt
2021年11月04日 00:27
Thanks for the nice blog. It was very useful for me. I'm happy I found this blog. Thank you for sharing with us.I too always learn something new from your post.
<a href="http://202.95.10.77/">judi qiu qiu online</a>
2021年11月04日 00:36
This is exactly for that reason fabulous and additionally extremely creative. I simply absolutely love all the different shades and additionally anyone can get the software on the deliver would be happy. judi online24jam terpercaya 2020
2021年11月09日 00:49
Seriously! What exactly a close watch opener that write-up has become in my opinion. Completely liked, book-marked, When i can’t lose time waiting for far more! silk pajama set womens
2021年11月09日 00:57
This is exactly for that reason fabulous and additionally extremely creative. I simply absolutely love all the different shades and additionally anyone can get the software on the deliver would be happy. silk pajamas set
2021年11月12日 21:31 It is a great suggestions specifically to be able to people not used to blogosphere, quick and also correct information… Thank you regarding revealing this place. A necessity examine write-up judi qiu qiu online
2021年12月31日 03:20
Seriously! What exactly a close watch opener that write-up has become in my opinion. Completely liked, book-marked, When i can’t lose time waiting for far more! 카지노사이트
2021年12月31日 03:28
Great posting, moved in front plus saved as a favorite your web blog. I actually can’t put it off to read simple things extra out of you actually 카지노사이트
2022年2月02日 02:47
Thanks for the nice blog. It was very useful for me. I'm happy I found this blog. Thank you for sharing with us.I too always learn something new from your post. situs garudaqq
2022年2月02日 02:51
It is a great suggestions specifically to be able to people not used to blogosphere, quick and also correct information… Thank you regarding revealing this place. A necessity examine write-up dominoqq
2022年2月15日 05:46
Wonderful blog post, resolved to go on and even bookmarked your webblog. As i can't hold on to enjoy a book alot more as a result of one. situs garudaqq
2022年7月01日 23:46
NCERT Class 1,2, 3, 4, 5, 6, 7, 8, 9, 10 Textbooks 2023 for Providing the best learning Platform with Various Resources to Support and enhance Educational Delivery and Management. Students Download NCERT Books 2023 for Class 1,2, 3, 4, 5, 6, 7, 8, 9, 10 Subject Wise and Hindi, Urdu, English Medium Wise our Website Provide Pdf Format, This Online Service offers easy Access to the NCERT e-Book 2023 for Class 1,2, 3, 4, 5, 6, 7, 8, 9, 10. <a href="https://10thmodelpaper.in/ncert-books-for-class-1-2-3-4-5-6-7-8-9-10/">NCERT 8th Class Textbook 2023</a> The service covers eBooks of all subjects Published by NCERT for Class 1,2, 3, 4, 5, 6, 7, 8, 9, 10 Class in Hindi, English and Urdu.
2022年7月01日 23:47
NCERT Class 1,2, 3, 4, 5, 6, 7, 8, 9, 10 Textbooks 2023 for Providing the best learning Platform with Various Resources to Support and enhance Educational Delivery and Management. Students Download NCERT Books 2023 for Class 1,2, 3, 4, 5, 6, 7, 8, 9, 10 Subject Wise and Hindi, Urdu, English Medium Wise our Website Provide Pdf Format, This Online Service offers easy Access to the NCERT e-Book 2023 for Class 1,2, 3, 4, 5, 6, 7, 8, 9, 10. NCERT 8th Class Textbook 2023 The service covers eBooks of all subjects Published by NCERT for Class 1,2, 3, 4, 5, 6, 7, 8, 9, 10 Class in Hindi, English and Urdu.
2022年8月01日 20:10
Spesso però bastano pochi giorni per perdere la motivazione iniziale. Non importa quanto tu ti senta motivato all’inizio: dopo qualche giorno continuare sembra impossibile.
2022年8月10日 23:14
Buying or selling a home is more than just a transaction: it’s a life-changing experience. That’s why I highly-seasoned real estate professionals is dedicated to providing exceptional, personalized service for all of my clients.
2022年8月20日 18:11
This will show you any content pages associated with those links. The content pages are usually informational, although sometimes they contain affiliate links to other companies. dark web links
2022年8月20日 18:59
To find out more about links, subscribe to the newsletter called Search Engine Land. In this newsletter, you will receive important tips and information about improving your site's ranking on Google. deep web
2022年8月20日 19:28
The Dark Net is an untapped goldmine for anyone willing to take advantage of it. The Dark Web is a part of the World Wide Web that's not visible to the common browser or search engine. dark web sites
2022年8月20日 20:02
A lot of these sites are link farms. These are websites that have hundreds of other links leading to their own page on the Web. dark web links
2022年8月20日 20:20
Other sites, such as those offering gambling sites, have been known to spam innocent gamers with links to their own gambling sites. dark web
2022年8月20日 20:42
The most common product an affiliate marketer sells is information products. This can be information on a new topic, an e-book, or even a manual on a particular subject. work from home jobs
2022年8月20日 21:00
These are usually small text within the content. Many people include these within their material because they want to sell the reader something. They will usually give you a portion of the sale if they are sold. affiliate marketing success
2022年9月16日 06:53
Every student of class 10 can learn Hindi easily and this is or National language, Hindi is the most important language for every student, AP SSC Hindi Question Paper and the Board of Secondary Education, Andhra Pradesh (BSEAP) class 10th of SSC students also can download the AP 10th Hindi Model Paper 2023 Pdf with Solved question paper in chapter wise for all lessons of the course as AP SSC Hindi Model Paper 2023. Every student of class 10 can learn Hindi easily and this is or National language, Hindi is the most important language for every student.
2022年12月21日 20:24
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often. Plagiarism Checker
2023年1月04日 23:49
I needed to thank you for this incredible read!! I unquestionably adored each and every piece of it. I have you bookmarked your site to look at the new stuff you post. All video downloader
2023年1月21日 23:16
Interesting topic for a blog. I have been searching the Internet for fun and came upon your website. Fabulous post. Thanks a ton for sharing your knowledge! It is great to see that some people still put in an effort into managing their websites. I'll be sure to check back again real soon. <a href="https://www.youtube.com/@SufiQawwaliNetwork">sufi qawwali network</a>
2023年1月22日 22:33
Punjab National Bank is a famous but respected national bank in India, and the bank's Net Banking service allows its users to access many services online without having to visit a branch. Pnbnetbanking As technology advances, the services provided by banks via their Net Banking feature are increasing, and there are several advantages for customers who have access to the PNB Net Banking service.
2023年1月23日 22:49
I found that site very usefull and this survey is very cirious, I ' ve never seen a blog that demand a survey for this actions, very curious... [url=https://www.ufa147.info/]เว็บแทงบอล[/url]
2023年1月25日 22:49
I recently found many useful information in your website especially this blog page. Among the lots of comments on your articles. Thanks for sharing. [url=https://uancv.edu.pe/ofinvestigacion/app/upload/users/1/1936/my_files/slot303.html]slot[/url]
2023年1月25日 22:54
We have sell some products of different custom boxes.it is very useful and very low price please visits this site thanks and please share this post with your friends. [url=https://uancv.edu.pe/ofinvestigacion/app/upload/users/1/1936/my_files/slot303.html]slot[/url]
2023年1月25日 23:06
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with extra information? It is extremely helpful for me. [url=https://uancv.edu.pe/ofinvestigacion/app/upload/users/1/1936/my_files/slot303.html]slot[/url]
2023年1月25日 23:10
I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work... [url=https://uancv.edu.pe/ofinvestigacion/app/upload/users/1/1936/my_files/slot303.html]slot[/url]
2023年1月26日 00:00
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often. [url=https://uancv.edu.pe/ofinvestigacion/app/upload/users/1/1936/my_files/slot303.html]slot[/url]
2023年1月28日 20:15
Thanks for a wonderful share. Your article has proved your hard work and experience you have got in this field. Brilliant .i love it reading. [url=https://uancv.edu.pe/ofinvestigacion/app/upload/users/1/1936/my_files/slot303.html]slot[/url]
2023年1月28日 20:20
Awesome and interesting article. Great things you've always shared with us. Thanks. Just continue composing this kind of post. [url=https://uancv.edu.pe/ofinvestigacion/app/upload/users/1/1936/my_files/slot303.html]slot[/url]
2023年1月28日 20:35
I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work... [url=https://uancv.edu.pe/ofinvestigacion/app/upload/users/1/1936/my_files/slot303.html]slot[/url]
2023年1月28日 20:41
This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post. [url=https://uancv.edu.pe/ofinvestigacion/app/upload/users/1/1936/my_files/slot303.html]slot[/url]
2023年1月30日 20:25
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. 에볼루션카지노
2023年1月31日 00:25
I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article.
2023年1月31日 00:29
You there, this is really good post here. Thanks for taking the time to post such valuable information. Quality content is what always gets the visitors coming.
2023年1月31日 00:46
I was reading some of your content on this website and I conceive this internet site is really informative ! Keep on putting up.
2023年1月31日 00:50
This particular papers fabulous, and My spouse and i enjoy each of the perform that you have placed into this. I’m sure that you will be making a really useful place. I has been additionally pleased. Good perform!
2023年1月31日 00:53
Its a great pleasure reading your post.Its full of information I am looking for and I love to post a comment that "The content of your post is awesome" Great work.
2023年1月31日 20:32
Many homework on the continual hunt along with offstage on the road to winning. Definitely not attached, simple to-fall as a result of wayside; And not investigation, afterward into a path travel toward the black. cfm certification course
2023年2月03日 19:25
PSU introduced a Welcome offer on new recharge plans of BSNL applicable for a cell phone for all new customers with a complimentary 4G mobile data on each BSNL validity recharge plan activation, So have a look at below is the wide range of 2023 new portfolio available for all the users throughout India for 2023. BSNL Validity Plan You may check the specific daily prepaid recharge offers, one year plan of Bharat Sanchar Nigam Limited and also find BSNL all India free roaming facility including Mumbai and Delhi by allowing new prepaid mobile plan with unlimited data and calls.
2023年2月13日 23:29
Good day! I simply wish to give an enormous thumbs up for the great info you’ve got right here on this post. I might be coming back to your blog for more soon.
villa design in dubai
engineering consultants in abu dhabi
2023年2月13日 23:31
Wow, cool post. I’d like to write like this too – taking time and real hard work to make a great article… but I put things off too much and never seem to get started. Thanks though.
interior design companies in dubai
villa renovation dubai
2023年2月13日 23:33
I’m curious to find out what blog platform you happen to be using? I’m having some small security problems with my latest website and I would like to find something more risk-free. Do you have any solutions?
dso authority
dm approval
2023年6月06日 01:27
Thanks for a beautiful share. Your article has proven the hard work and experience you have got in this field. Brilliant.
2023年6月06日 05:45
The website is looking a bit flashy and it catches the visitor's eyes. The design is pretty simple and has a good user-friendly interface.
2023年11月03日 01:22
Yfter all thats enounced and done I m curious to have word the amount of peoples truly realise the writer has merely revealed. Thanks. Packers and Movers Mumbai to Gurgaon
2023年11月08日 21:13 Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. plagiarism checker unlimited words
2023年11月08日 23:09
Nice to be visiting your blog again, it has been months for me. Well this article that i’ve been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share. banglaword
2023年11月09日 00:15
Hello I am so delighted I located your blog, I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work. h5.fire kirin