Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge over proxy [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
118947
n00b
n00b


Joined: 19 Sep 2005
Posts: 69

PostPosted: Tue Nov 01, 2005 10:39 am    Post subject: emerge over proxy [solved] Reply with quote

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
Code:
iface_eth0="dhcp"

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 :cry:


Last edited by 118947 on Wed Nov 09, 2005 8:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Tue Nov 01, 2005 10:57 am    Post subject: Reply with quote

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
View user's profile Send private message
118947
n00b
n00b


Joined: 19 Sep 2005
Posts: 69

PostPosted: Tue Nov 01, 2005 11:37 am    Post subject: Reply with quote

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
View user's profile Send private message
anunakin
Tux's lil' helper
Tux's lil' helper


Joined: 31 May 2004
Posts: 101

PostPosted: Tue Nov 01, 2005 11:44 am    Post subject: Reply with quote

Open /etc/profile and put this lines:
Code:
vi /etc/profile

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 :wink:
_________________
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
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Tue Nov 01, 2005 1:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
anunakin
Tux's lil' helper
Tux's lil' helper


Joined: 31 May 2004
Posts: 101

PostPosted: Tue Nov 01, 2005 2:34 pm    Post subject: Reply with quote

yeap, if u dont have the 873/tcp port, opened on u proxy... u can use
Code:
emerge-webrsync

_________________
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
View user's profile Send private message
118947
n00b
n00b


Joined: 19 Sep 2005
Posts: 69

PostPosted: Tue Nov 01, 2005 8:11 pm    Post subject: Reply with quote

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.
Code:
emerge --sync

doesn't work. 'Normal' emerging works though (I mean downloading packages works).
I tried the command
Code:
emerge-webrsync

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
Code:
etc-update
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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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