LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Internet not working in terminal (https://www.linuxquestions.org/questions/linux-networking-3/internet-not-working-in-terminal-4175492865/)

vviivveekkk 01-28-2014 09:35 AM

Internet not working in terminal
 
I am connected to network using a static IP, and a gateway.. I can access internet through Firefox by setting the proxy address, username and password in Advanced panel of the Firefox Options. But I cant access internet through any application in terminal. Neither does ping work, nor yum..! I have searched over internet, and got some results related to "resolv.conf" file, and "yum.conf" file but to no avail.. I am getting the following error in yum

Code:

[root]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6 ... 64&repo=os error was
14: PYCURL ERROR 7 - "Failed to connect to 2a02:2498:1:3d:5054:ff:fed3:e91a: Network is unreachable"
Error: Cannot find a valid baseurl for repo: base

If someone could guide me in right direction...
Thanks

TenTenths 01-28-2014 09:38 AM

https://www.centos.org/docs/5/html/y...xy-server.html

stateless 01-28-2014 03:08 PM

Quote:

Originally Posted by vviivveekkk (Post 5106813)
I am connected to network using a static IP, and a gateway.. I can access internet through Firefox by setting the proxy address, username and password in Advanced panel of the Firefox Options. But I cant access internet through any application in terminal. Neither does ping work, nor yum..! I have searched over internet, and got some results related to "resolv.conf" file, and "yum.conf" file but to no avail.. I am getting the following error in yum

Code:

[root]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6 ... 64&repo=os error was
14: PYCURL ERROR 7 - "Failed to connect to 2a02:2498:1:3d:5054:ff:fed3:e91a: Network is unreachable"
Error: Cannot find a valid baseurl for repo: base

If someone could guide me in right direction...
Thanks

If you have a gateway, then by definition you probably have some kind of direct access to the Internet (that's the purpose of a gateway). Do you know, or could you find out, exactly what traffic you are allowed to send out through the firewall? That would make providing a helpful answer easier.

As far as routing your HTTP traffic through a http proxy, I believe you are looking for something like this:

http://yonitg.com/proxy-settings-for-the-command-line/

There are SOCKS proxies (e.g., TOR systems) that can handle all protocols, but I'm not sure what is available on your network. There are also some ways to tunnel through firewalls, if you are in a very restrictive situation...

andy78 01-28-2014 05:15 PM

ryn the following command and paste in the output

ping mirrorlist.centos.org

jefro 01-30-2014 03:39 PM

Depending on the distro you might get some proxies to work globally or near globally with some system wide proxy setting. If you have a proxy.pac then forget about most command line apps unless you discover the proxy.pac rules.

If it doesn't work with global then you can sometimes edit various config files to mark the correct way to connect. We'd have to know your distro and maybe more about this topology. The admin might have blocked ports or even a application firewall is in the path.

vviivveekkk 02-13-2014 12:39 PM

It started working.. Thanks
 
Quote:

Originally Posted by TenTenths (Post 5106817)

I followed the link and made changes to the /etc/yum.conf and ~/.bash_profile, and the internet started working. Thanks for help.


All times are GMT -5. The time now is 08:33 PM.