View previous topic :: View next topic |
Author |
Message |
118947 n00b
Joined: 19 Sep 2005 Posts: 69
|
Posted: Tue Nov 01, 2005 10:39 am Post subject: emerge over proxy [solved] |
|
|
Hi! I`m currently trying to reinstall gentoo on my machine. The only way I can currently acsses the internet is via a proxy.
Now using windows, I had to set everything to dhcp and automatic configuration + adding a line to the connection settings in my browser to point it at a certain "proxy.pac" file residing on the dhcp server. everything works.
Now, back to gentoo. I don't seem able to get emerge working. I always get the error "cannot resolv hostname...etc"
I also can't ping, for instance, google. Hence I believe that my connection is not setup right.
I've added the line
to /etc/conf.d/net.
I (using the live cd) did net-setup eth0, set it to dhcp, and copied over the nameserver addresses in /etc/resolv.conf to my actual resolv.conf. BTW, I can't ping using the live cd either.
Now I've read about doing
Code: | echo http_proxy="www.myserver.de:port" >> /etc/env.d/proxy |
or doing
Code: | export http_proxy=""http://myserver.de:port" |
or adding the above line to /etc/profile.
Nothing works.
Help. I'm stuck right down at trying to emerge sysklogd and seriously, that isn't gentoo
Last edited by 118947 on Wed Nov 09, 2005 8:39 pm; edited 1 time in total |
|
Back to top |
|
|
think4urs11 Bodhisattva
Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Tue Nov 01, 2005 10:57 am Post subject: |
|
|
Hi,
you might need to check the content of the proxy.pac file to find out the correct settings for your proxy.
This can be done e.g. by downloading the pac file to disk and checking for "PROXY w.x.y.z" lines.
This statement is what you need for your export http_proxy.
Easy way in windows would be to use telnet to get the PAC if downloading isn't possible directly.
- telnet 'server address' 80 (opens a connection to web server which holds the pac)
- type GET proxy.pac
- check result for PROXY statements
HTH
T. _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
|
118947 n00b
Joined: 19 Sep 2005 Posts: 69
|
Posted: Tue Nov 01, 2005 11:37 am Post subject: |
|
|
here :
Code: | function FindProxyForURL(url, host)
{
if (isPlainHostName(host)
|| dnsDomainIs(host, ".xxx")) {
return "DIRECT";
}
if (shExpMatch(url,"http://localhost*") || shExpMatch(url,"http://127.0.0.1*")) {
return "DIRECT";
}
if (shExpMatch(url,"http://141.26.128.*")) {
return "DIRECT";
}
if (shExpMatch(url,"*://xxx2*")) {
return "DIRECT";
}
if (dnsDomainIs(host, ".de"))
return "PROXY xxx3.de:3128; PROXY xxx3:3129; DIRECT";
return "PROXY xxx3:3129; PROXY xxx3:3128; DIRECT";
} |
|
|
Back to top |
|
|
anunakin Tux's lil' helper
Joined: 31 May 2004 Posts: 101
|
Posted: Tue Nov 01, 2005 11:44 am Post subject: |
|
|
Open /etc/profile and put this lines:
Code: | export http_proxy="http://YOURPROXYSERVER:PROXYPORTNUMBER"
export https_proxy="http://YOURPROXYSERVER:PROXYPORTNUMBER"
export ftp_proxy="http://YOURPROXYSERVER:PROXYPORTNUMBER"
#Servers to not use proxy
export no_proxy="localhost,server007,intranet,.internalnetwork.int,10.0.0.0" |
Run env-update, and source /etc/profile
Code: | env-update
source /etc/profile |
This works fine to a proxy with basic authentication, like SQUID, APACHE (mod_proxy) and others, but if u run behind a M$-ISA Server u go need install and configure the package ntlmaps, this goes make u auth in ISA Server....
This works fine with emerge, wget and others _________________ Anunakin (Marcus Fazzi)
PHP/Java/C++ Developer
Sony PS3 JPN 60GB, with Gentoo Linux + HDD 160GB
Sony PS2 50001, with PS2Linux, HDD 80GB |
|
Back to top |
|
|
think4urs11 Bodhisattva
Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Tue Nov 01, 2005 1:03 pm Post subject: |
|
|
additionally for rsync you need to add
Code: | export RSYNC_PROXY="yourproxy:proxyport" |
your proxy needs to support/allow the http CONNECT method on port 873/tcp for this
(normally this isn't default on proxies, so you might need the university admins to reconfigure it for you) _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
|
anunakin Tux's lil' helper
Joined: 31 May 2004 Posts: 101
|
Posted: Tue Nov 01, 2005 2:34 pm Post subject: |
|
|
yeap, if u dont have the 873/tcp port, opened on u proxy... u can use
_________________ Anunakin (Marcus Fazzi)
PHP/Java/C++ Developer
Sony PS3 JPN 60GB, with Gentoo Linux + HDD 160GB
Sony PS2 50001, with PS2Linux, HDD 80GB |
|
Back to top |
|
|
118947 n00b
Joined: 19 Sep 2005 Posts: 69
|
Posted: Tue Nov 01, 2005 8:11 pm Post subject: |
|
|
Ok, thanks for the help. I've managed to configure 'everything' to work.
I have however, two more questions:
first, I've installed dhcpcd, but in order to get it to configure my network for me, I have to manually run it. How can I automate the process, to get it to run at boot time?
second, it seems as though the 873/tcp port is blocked.
doesn't work. 'Normal' emerging works though (I mean downloading packages works).
I tried the command
and it basicly did the portage update. Then I was told to emerge a new version of portage and to update ALL my configs (this is not new to me). I then did a
which would normally merge my configs (using emerge --sync!). However I just got the
Code: | ...nothing left to do... |
Is this normal, do I need to update my config by hand !?! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|