当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 13 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 跪求帮忙,ubuntu下如何使用微软ISA 代理实现apt-get的更新?
帖子发表于 : 2016-12-09 13:55 

注册: 2016-12-09 13:18
帖子: 9
系统: ubuntu 12.04
送出感谢: 0 次
接收感谢: 0 次
小弟的困惑:
公司提供微软ISA作为公司员工上网的代理,公司有一个部门在ubuntu平台下做开发,时常用到apt-get安装程序及更新。公司的ISA代理无法在ubuntu下满足apt-get的使用。
网上搜索到解法是ubuntu本地安装和配置NTLMAPS访问ISA服务器 ,参见如下link:http://blog.csdn.net/hj33053252/article/details/6193215
一步步安装配置,最终还是无法成功,为这个问题已经纠结了很久,实在没办法,想通过论坛寻求高人指点,如能解决这个issue,小弟愿以身相许 :Haha
配置文件和执行结果请参考附件。
在线等待高人,期盼..........


附件:
系統代理配置文件.jpg
系統代理配置文件.jpg [ 48.46 KiB | 被浏览 759 次 ]

server.cfg.txt [7.2 KiB]
被下载 8 次
120901.jpg
120901.jpg [ 83.81 KiB | 被浏览 759 次 ]

页首
 用户资料  
 
2 楼 
 文章标题 : Re: 跪求帮忙,ubuntu下如何使用微软ISA 代理实现apt-get的更新?
帖子发表于 : 2016-12-09 14:04 

注册: 2009-08-04 16:33
帖子: 16893
送出感谢: 21
接收感谢: 1827
終端機指令及回應文字
請直接全部選取/複製/貼上來
方便回文時 直接引用
方便你閱讀


页首
 用户资料  
 
3 楼 
 文章标题 : Re: 跪求帮忙,ubuntu下如何使用微软ISA 代理实现apt-get的更新?
帖子发表于 : 2016-12-09 14:04 

注册: 2016-12-09 13:18
帖子: 9
系统: ubuntu 12.04
送出感谢: 0 次
接收感谢: 0 次
帖子不能沉啊.... :Adore


页首
 用户资料  
 
4 楼 
 文章标题 : Re: 跪求帮忙,ubuntu下如何使用微软ISA 代理实现apt-get的更新?
帖子发表于 : 2016-12-09 14:05 

注册: 2016-12-09 13:18
帖子: 9
系统: ubuntu 12.04
送出感谢: 0 次
接收感谢: 0 次
server.cfg 配置文件:

peter@peter123:~$ cat /usr/local/bin/ntlmaps/server.cfg
#========================================================================
[GENERAL]

LISTEN_PORT:8080

# If you want APS to authenticate you at WWW servers using NTLM then just leave this
# value blank like PARENT_PROXY: and APS will connect to web servers directly.
# You can specify more than one proxy by leaving a space between each one, and
# APS will detect when one fails and automatically fail-over to the next. EG:
#PARENT_PROXY:first_proxy second_proxy third_proxy
# And NOTE that NTLM cannot pass through another proxy server.
PARENT_PROXY:192.168.0.4

PARENT_PROXY_PORT:80

# APS will poll the upstream proxy and attempt to fail-over to a new one if it doesn't
# get a response within an appropriate time frame. The amount of time that it will
# wait for a response before attempting fail-over is specified, in seconds, below:
PARENT_PROXY_TIMEOUT:15

# Set to 1 if you want to grant this authorization service to clients from other computers.
# NOTE: all the users from other hosts that will be using you copy of APS for authentication
# will be using your credentials in NTLM auth at the remote host.
ALLOW_EXTERNAL_CLIENTS:1

# If you want to allow some other but not all computers to use your proxy for authorization,
# just set ALLOW_EXTERNAL_CLIENTS:0 and put friendly IP addresses here.
# Use space as a delimiter.
# NOTE that special addesses don't work here (192.168.3.0 for example).
FRIENDLY_IPS:

# Requested URLs are written to "url.log" file. May be useful.
URL_LOG:0

# When a network service listens for connections, there is a maximum number of connection
# attempts to that service that the underlying OS will allow to backlog waiting for a response
# before the OS will start dropping new connection attempts with 'Connection refused'. The
# standard method of determining the maximum number of backlogged connections is to use the
# SOMAXCONN constant, which is supposed to represent the maximum number that an OS will support
# (for example, 5 on Windows 2000 Pro, and 200 on Windows 2000 server). However, because this
# is a statically compiled value in a Python distribution, usually this instead represents the
# the most conservative value (5 on all Windows platforms, and 128 on the GNU/Linux variant I
# tried). So if you are running (for example) a massively threaded/parallel download manager,
# the default value of, say, 5, or whatever SOMAXCONN happens to be set to, may be too low and
# cause some connections to fail. The value below can be set to any integer (it seems that
# Python just silently caps values above the hard limit for the underlying platform), or it can
# be set to the special value of SOMAXCONN (i.e. MAX_CONNECTION_BACKLOG:SOMAXCONN), to use
# whatever this value happens to be set to in your Python build. Setting this higher than
# necessary may cause APS to consume more memory than you needed to.
MAX_CONNECTION_BACKLOG:5

#========================================================================
[CLIENT_HEADER]

# This section describes what and how the server should change in the clients headers.
# Made in order to prevent parent proxy from seeing that you are using wget instead of IE5.5

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */*
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)

# for windows 2000 emulation ;)
# User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT5)

# You can uncomment these chages in client's header to mimic IE5+ better, but in this case
# you may expirience problems with *.html if your client does not really handle compression.
#Accept-Encoding: gzip, deflate

#========================================================================
[NTLM_AUTH]

# Optional value, if leaved blank then APS will use gethostname() to determine
# host's name.
# NOTE1: If you Linux host name differs from Windows host name then it may be that
# MS server wont recognize you host at all and wont grant you access
# to resources requested. Then you have to use this option and APS will use
# this name in NTLM negotiations.
# NOTE2: There are several reports that you can successfully use "foreign" host name
# here. Say, if user may access a resource from 'host1' and may not from 'host2'
# then there is a chance that APS running on 'host2' with NT_HOSTNAME:host1 will
# be able to be granted access to the restricted resource. However use this on
# you own risk as such a trick may be considered as a hack or something.
NT_HOSTNAME:jack123

# Windows Domain.
# NOTE: it is not full qualified internet domain, but windows network domain.
NT_DOMAIN:desy_sh
# What user's name to use during authorization. It may differ form real current username.
# If you enable NTLM_TO_BASIC, below, you can either leave this blank or simply
# hash it out.
USER:jack_ma

# Password. Just leave it blank here and server will request it at the start time,
# or, if you enable NTLM_TO_BASIC, below, you can either leave this blank or simply
# hash it out, and you *won't* be prompted for a password at start time.
PASSWORD:ewefs3234@

# These two options replace old FULL_NTLM option.
# NTLM authentication consists virtually of two parts: LM and NT. Windows95/98 use
# only LM part, WindowsNT/2000 can use NT and LM or just NT part.
# Almost always using just LM part will be enough. I had several reports
# about LM and NT requirement and no about just NT.
# So try to setup 1, 1 only if you have enough reasons to do so and when you understand
# what you are doing.
# 0, 0 is an illegal combination
# NOTE: if you change these options then you have to setup flag option accordingly.
LM_PART:1
NT_PART:0

# Highly experimental option. See research.txt for details.
# LM - 06820000
# NT - 05820000
# LM + NT - 07820000
NTLM_FLAGS: 06820000

# This option makes APS try to translate NTLM authentication to very usual "Basic"
# scheme. Almost all http clients know it. With this option set to 1 user will be requested
# by his browser to enter his credentials and these username and password will be used by
# APS for NTLM authentication at MS Proxy server or Web server.
# In such a case different users can use one runnig APS with their own credentials.
# NOTE1: currently translation works so it allows only one try for entering
# username/password. If you make a mistake you will have to restart you browser.
# NOTE2: With debug:1 basic username/password will be written in log file in clear
# text format. I could try hide it, but the basic scheme is so weak that anybody
# who had access to APS would be able to get it.
NTLM_TO_BASIC:0

#========================================================================
[DEBUG]

# Set this to 1 if you want to see debug info in many log files. One per connection.
DEBUG:0

# Set this to 1 to get even more debug info.
BIN_DEBUG:0

# Set this to 1 to see some strange activity on screen. Actually you won't want it.
SCR_DEBUG:0

# Not actually a debug option but gives you some details on authentication process
# into *.auth logs. Also see research.txt.
AUTH_DEBUG:0


页首
 用户资料  
 
5 楼 
 文章标题 : Re: 跪求帮忙,ubuntu下如何使用微软ISA 代理实现apt-get的更新?
帖子发表于 : 2016-12-09 16:01 

注册: 2016-12-09 13:18
帖子: 9
系统: ubuntu 12.04
送出感谢: 0 次
接收感谢: 0 次
1. 执行配置文件,结果如下也不知道这个结果是否为成功?

peter@jack123:~$ sudo /usr/local/bin/ntlmaps/main.py -c /usr/local/bin/ntlmaps/server.cfg
[sudo] password for peter:
NTLM authorization Proxy Server v0.9.9.0.1
Copyright (C) 2001-2004 by Dmitry Rozmanov and others.
Now listening at peter123 on port 8080
^CGot SIGINT, exiting now...

2. 修改主目录(即/home/yourusername/)下的.bashrc文件:
http_proxy=http://127.0.0.1:8080
export http_proxy

3. apt-get测试,失败。。。
peter@jack123:~$ sudo apt-get upgrade
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。


页首
 用户资料  
 
6 楼 
 文章标题 : Re: 跪求帮忙,ubuntu下如何使用微软ISA 代理实现apt-get的更新?
帖子发表于 : 2016-12-09 16:45 

注册: 2009-08-04 16:33
帖子: 16893
送出感谢: 21
接收感谢: 1827
看看這兩篇能否幫上忙

https://help.ubuntu.com/community/AptGe ... http-proxy
Setting up apt-get to use a http-proxy
These are three methods of using apt-get with a http-proxy.

https://help.ubuntu.com/community/AptGe ... proxy_user
How to login a proxy user


页首
 用户资料  
 
7 楼 
 文章标题 : Re: 跪求帮忙,ubuntu下如何使用微软ISA 代理实现apt-get的更新?
帖子发表于 : 2016-12-12 13:24 

注册: 2016-12-09 13:18
帖子: 9
系统: ubuntu 12.04
送出感谢: 0 次
接收感谢: 0 次
poloshiao 写道:
看看這兩篇能否幫上忙

https://help.ubuntu.com/community/AptGe ... http-proxy
Setting up apt-get to use a http-proxy
These are three methods of using apt-get with a http-proxy.

https://help.ubuntu.com/community/AptGe ... proxy_user
How to login a proxy user


您说的方法对于企业网域账号来说不可行,对于处在ISA防火墙后面的用户,网域用户名中带有一个反斜杠:,而这在上面的格式中,是不允许的。
所以,才需要本地建一个Proxy做中转。
但还是谢谢你。


页首
 用户资料  
 
8 楼 
 文章标题 : Re: 跪求帮忙,ubuntu下如何使用微软ISA 代理实现apt-get的更新?
帖子发表于 : 2016-12-12 13:31 

注册: 2016-12-09 13:18
帖子: 9
系统: ubuntu 12.04
送出感谢: 0 次
接收感谢: 0 次
帖子不能沉啊,有大神吗?


页首
 用户资料  
 
9 楼 
 文章标题 : Re: 跪求帮忙,ubuntu下如何使用微软ISA 代理实现apt-get的更新?
帖子发表于 : 2016-12-13 10:01 

注册: 2016-12-09 13:18
帖子: 9
系统: ubuntu 12.04
送出感谢: 0 次
接收感谢: 0 次
帖子不能沉啊,有大神吗? 12/13


页首
 用户资料  
 
10 楼 
 文章标题 : Re: 跪求帮忙,ubuntu下如何使用微软ISA 代理实现apt-get的更新?
帖子发表于 : 2016-12-13 15:29 

注册: 2009-08-04 16:33
帖子: 16893
送出感谢: 21
接收感谢: 1827
引用:
对于处在ISA防火墙后面的用户,网域用户名中带有一个反斜杠:,而这在上面的格式中,是不允许的。

在防火牆 有沒有開放 proxy port ?
參閱
https://help.ubuntu.com/lts/serverguide/squid.html
Squid - Proxy Server
使用 port 搜尋


页首
 用户资料  
 
11 楼 
 文章标题 : Re: 跪求帮忙,ubuntu下如何使用微软ISA 代理实现apt-get的更新?
帖子发表于 : 2016-12-13 18:31 

注册: 2007-01-14 16:23
帖子: 4255
送出感谢: 0 次
接收感谢: 107
这种事,直接给IT团队提需求啊,自己折腾多费事,如果这是你自己的事情,看到以身相许,我就没啥想法了,妹子也许还能考虑下


页首
 用户资料  
 
12 楼 
 文章标题 : Re: 跪求帮忙,ubuntu下如何使用微软ISA 代理实现apt-get的更新?
帖子发表于 : 2016-12-14 11:18 

注册: 2016-12-09 13:18
帖子: 9
系统: ubuntu 12.04
送出感谢: 0 次
接收感谢: 0 次
poloshiao 写道:
引用:
对于处在ISA防火墙后面的用户,网域用户名中带有一个反斜杠:,而这在上面的格式中,是不允许的。

在防火牆 有沒有開放 proxy port ?
參閱
https://help.ubuntu.com/lts/serverguide/squid.html
Squid - Proxy Server
使用 port 搜尋


公司现在用的就是Squid + Sarg ,但是我想切回ISA由AD账号统一管理更为方便,虽然我现在也同步在考虑Squid加入AD Group认证。


页首
 用户资料  
 
13 楼 
 文章标题 : Re: 跪求帮忙,ubuntu下如何使用微软ISA 代理实现apt-get的更新?
帖子发表于 : 2016-12-14 11:22 

注册: 2016-12-09 13:18
帖子: 9
系统: ubuntu 12.04
送出感谢: 0 次
接收感谢: 0 次
onlylove 写道:
这种事,直接给IT团队提需求啊,自己折腾多费事,如果这是你自己的事情,看到以身相许,我就没啥想法了,妹子也许还能考虑下

鄙人就是IT :Hehe


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 13 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译