Problem connect to the internet

Hello guys! My FreeBSD system is unable to connect to the internet!
I would like to inform you that the network have a proxy squid without user name and password. I tried to assign proxy at rc.conf with the following commnand but nothing happens
Code:
 setenv http_proxy="http://192.168.170.81:8080/"
but still unable to connect in order to add new packages to my system!

Thanks in advance !
 
L__E__O__N said:
I tried to assign proxy at rc.conf with the following commnand but nothing happens
Code:
 setenv http_proxy="http://192.168.170.81:8080/"
It doesn't work that way. Add it to your ~/.cshrc.
 
SirDice said:
It doesn't work that way. Add it to your ~/.cshrc.

The ~/.cshrc is user related file, isn't it better to use /etc/make.conf in order to fetch ports using proxy? Something like this:

Code:
FETCH_ENV=FTP_PROXY=ftp://name:pass@host:port
FETCH_ENV=HTTP_PROXY=http://name:pass@host:port
Of course you can ommit name and password if the proxy doesn't require authorization.
 
hedgehog said:
The ~/.cshrc is user related file, isn't it better to use /etc/make.conf in order to fetch ports using proxy?
All roads lead to Rome. Except the one the OP was trying to take ;)
 
SirDice said:
All roads lead to Rome. Except the one the OP was trying to take ;)
True. But what if he use sudo without exporting environment variables to the root account (i.e. by default) ? :)
 
SirDice said:
It doesn't work that way. Add it to your ~/.cshrc.

I add this at ~/.cshrc and when i reboot i receive the follow message: setenv Syntax Error

this is what i add :

setenv http_proxy="http://192.168.170.81:8080/".
 
Ah, oops. Missed that. Remove the equal sign.

Code:
setenv http_proxy http://192.168.170.81:8080/
 
I checked everything and looks fine. I can't fine a reason that can not connect to the internet.

The IP is assigned normally from DHCP and I can ping the other pc to my site to the network normally but I can't ping the other site of the network that there is the proxy.
 
You probably don't have direct access to the internet. That's why you must use a proxy.
 
SirDice said:
You probably don't have direct access to the internet. That's why you must use a proxy.

yes , so i use the setenv http_proxy commnad at ~/.cshrc but still nothing.

Thank you
 
Explain "nothing"! Explain what you are doing! We are not clairvoyant and we can't see what you are doing.
 
SirDice said:
Explain "nothing"! Explain what you are doing! We are not clairvoyant and we can't see what you are doing.


Ok. The aim is that I want to have internet connection to my fresh installed FreeBSD system in order to setup my FreeBSD system via internet etc.

I have a DHCP server that give the right IP to my system. Also I assign the gateway to rc.conf. Then I assign the network proxy server to the ~/.cshrc.

Let me explain that my network have 2 different network sites that they have a different IPs

for example: site 1 192.168.171.10 site 2 192.168.170.10

I am in site one with and I have an IP 192.168.171.12 and I can ping all the PCs at the site 1 but I can't ping the PCs from the site 2, and also proxy server is at site 2.

A typical windows system at my network has an IP from DHCP the gateway and a proxy server assigned at internet explorer and everything works fine.

Any suggestion guys ? :\
 
Ping has nothing to do with a proxy, you have routing issues. Contact your network administrator.

You do not need to add the gateway to /etc/rc.conf, you will get the correct one from DHCP.
 
Ok the problem was solved !

The main problem was that a conflict occurs between my freebsd machine with another.

then i did the following steps :

1. i assign proxy server (http and ftp) to ~/.cshrc

2. i assign dns server to /etc/resolv.conf

3. i assign gateway to /etc/rc.conf

with defaultrouter command

4. i assign static ip to rc.conf and i disable DHCP due ip conflict error :stud

Thank you very much for your support ! ;)
 
If you use DHCP you shouldn't get IP address conflicts. If you do there's something seriously wrong with your DHCP server. Most DHCP servers will try to ping the address before serving it. If something responds the IP is in use and the server will try another IP address.
 
Back
Top