海运的博客

ROS配置HotSpot热点Web认证服务

发布时间:October 19, 2012 // 分类:ROS // No Comments

HotSpot是一种通过Web网页认证访问网络的方法,用户可以使网页浏览器通过HTTP快速接入网络。
ROS开启HotSpot通过以下几个步骤:
1.配置用户IP地址池:

#https://www.haiyun.me
ip pool add name=hotspot ranges=192.168.1.2-192.168.1.254

2.添加认证用户组规则:

ip hotspot user profile add name=hotspot address-pool=hotspot shared-users=1 idle-timeout=00:10 rate-limit=128k/1024k

3.添加认证用户和密码:

ip hotspot user add name=hotspot profile=hotspot server=all user=user password=passwd

4.配置服务器规则:

ip hotspot profile add name=hotspot login-by=http-chap hotspot-address=192.168.1.1 

5.新增并开启HotSpot服务:

ip hotspot add name=hotspot profile=hotspot interface=br-lan disabled=no 

然后通过ROS访问外网浏览器会自动转向hotspot认证页面:
ros hotspot认证页面.png

Openwrt路由下打开Modem猫web管理界面

发布时间:September 2, 2012 // 分类:OpenWrt // No Comments

Openwrt网段:192.168.1.1/24
Modem网段: 192.168.0.1/24
Openwrt下配置和Modem相连接端口IP:

#https://www.haiyun.me
ifconfig eth1.1 192.168.0.2 netmask 255.255.255.0

Iptables配置SNAT:

iptables -t nat -A POSTROUTING -d 192.168.0.1 -j MASQUERADE

iptables放行:

iptables -A INPUT -i eth1.1 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth1.1 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT

tracert测试:

C:\Users\Administrator>tracert 192.168.0.1

通过最多 30 个跃点跟踪到 192.168.0.1 的路由

  1     1 ms     1 ms     1 ms  OpenWrt.lan [192.168.1.1]
  2  1006 ms  2723 ms     2 ms  192.168.0.1

跟踪完成。

用Curl调试web服务器

发布时间:May 9, 2012 // 分类:常用软件 // No Comments

Curl是款功能很强大的www客户端,之前介绍过用curl上传下载FTP文件,本次记录下curl用于调试web服务器常用的命令。
1.获取服务器head信息:

curl -I https://www.haiyun.me

2.测试服务器网页压缩,如返回乱码即压缩。

curl  -H  "Accept-Encoding: gzip" https://www.haiyun.me

3.查看请求及返回head信息,如服务器支持压缩会返回Content-Encoding: gzip。

curl -v -I -H  "Accept-Encoding: gzip" https://www.haiyun.me

4.测试服务器虚拟主机:

curl -L -H "Host: www.haiyun.me" http://192.168.1.2/

5.测试HTTP性能:

curl -so /dev/null -w "%{time_namelookup} %{time_connect} %{time_redirect} %{time_pretransfer} \
%{time_starttransfer} %{time_total}\n" www.haiyun.me

6.测试服务器KeepAlive:

curl -v -I -H "Keep-Alive: 60" -H "Connection: keep-alive" www.haiyun.me www.haiyun.me

7.测试Proxy:

curl -I --proxy 192.168.1.1:7070 www.haiyun.me
curl -I --socks5 192.168.1.1:7070 www.haiyun.me

8.指定域名对应ip地址,相对于host支持https sni。

curl --resolve www.haiyun.me:443:1.2.3.4 https://www.haiyun.me/
分类
最新文章
最近回复
  • 海运: 恩山有很多。
  • swsend: 大佬可以分享一下固件吗,谢谢。
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
  • 孤狼: 擦。。。。apcupsd会失联 nut在冲到到100的时候会ONBATT进入关机状态,我想想办...
  • 海运: 网络,找到相应的url编辑重发请求,firefox有此功能,其它未知。
  • knetxp: 用浏览器F12网络拦截或监听后编辑重发请求,修改url中的set为set_super,将POS...
  • Albert: 啊啊啊啊啊啊啊啊啊 我太激动了,终于好了英文区搜索了半天,翻遍了 pve 论坛没找到好方法,博...