n*****n 发帖数: 1634 | 1 比如通过获得网关IP地址,判断本计算机是否属于教育网络。
原因是我打算做个软件,对于所有学校电脑都可以免费安装使用,其他的则不可以,不
知道是否容易做到 |
l***y 发帖数: 791 | 2 NAT could be commonly used so checking local pc's ip from the application
might not work.
making judgement based on the client's packets sent to the server side could
work but i don't know if there is a database available to test whether a
given ip resoles to an educational institution.
i.e. college X might have a registered domain x.edu that resolves to ip
address a.a.a.?/24; but it can also own other public addresses and give them
to campuses not running any public servers.
short answer: not easily done.
【在 n*****n 的大作中提到】 : 比如通过获得网关IP地址,判断本计算机是否属于教育网络。 : 原因是我打算做个软件,对于所有学校电脑都可以免费安装使用,其他的则不可以,不 : 知道是否容易做到
|
n*****n 发帖数: 1634 | 3 Thanks a lot!
could
them
【在 l***y 的大作中提到】 : NAT could be commonly used so checking local pc's ip from the application : might not work. : making judgement based on the client's packets sent to the server side could : work but i don't know if there is a database available to test whether a : given ip resoles to an educational institution. : i.e. college X might have a registered domain x.edu that resolves to ip : address a.a.a.?/24; but it can also own other public addresses and give them : to campuses not running any public servers. : short answer: not easily done.
|
z**r 发帖数: 17771 | 4 美国edu里面用私有地址的应该很少,网络打印机都是一个public ip
could
them
【在 l***y 的大作中提到】 : NAT could be commonly used so checking local pc's ip from the application : might not work. : making judgement based on the client's packets sent to the server side could : work but i don't know if there is a database available to test whether a : given ip resoles to an educational institution. : i.e. college X might have a registered domain x.edu that resolves to ip : address a.a.a.?/24; but it can also own other public addresses and give them : to campuses not running any public servers. : short answer: not easily done.
|
n**********l 发帖数: 271 | 5
LOL they give public IPs to printers but use NAT for all student owned
devices...
To OP, isn't source IP enough for your purpose? University IT should know
what IP they are using... hopefully..
or you can look it up from ARIN whois
http://bgp.he.net/AS13371#_prefixes
【在 z**r 的大作中提到】 : 美国edu里面用私有地址的应该很少,网络打印机都是一个public ip : : could : them
|
n*****n 发帖数: 1634 | 6 谢谢!
很多公司的软件,对学校有优惠价格,似乎也没用啥台高科技的手段,可能就是要个学
校的邮箱,什么的。或者是有的要教授写封信,
IP这个如果不好弄就算了,弄不好以为是有病毒。
【在 n**********l 的大作中提到】 : : LOL they give public IPs to printers but use NAT for all student owned : devices... : To OP, isn't source IP enough for your purpose? University IT should know : what IP they are using... hopefully.. : or you can look it up from ARIN whois : http://bgp.he.net/AS13371#_prefixes
|
s*****g 发帖数: 1055 | 7 #whois `curl -s ifconfig.me`
With appropriate flags or further parsing of the output will work for 99% of
your situation.
【在 n*****n 的大作中提到】 : 谢谢! : 很多公司的软件,对学校有优惠价格,似乎也没用啥台高科技的手段,可能就是要个学 : 校的邮箱,什么的。或者是有的要教授写封信, : IP这个如果不好弄就算了,弄不好以为是有病毒。
|