No Internet Access through Terminal

Issues when connected to a network that has a proxy. I get connection issues.

I updated the proxy configuration under Network settings. I have access and able to connect to websites through built-in firebox browser.

The issues is with the terminal
I can’t ping to google.com or apple.com etc…
I can’t do SSH from the terminal.
I get unresolved hosts. Even though I can access through a browser.

I always do updates and upgrades to the latest version of the OS. I didn’t run into the same issue when I had Ubuntu, but I like Parrot a lot more as an OS. It is much more secure.

Thanks

Hi:
Maybe your proxy configuration doesnt allow some connections (For example i have to connect to 443 port ssh-ing my $HOST, because it doesn’t allow that kind of connections, but it cant spy 443 connections, so at home i’ve configured ssh listening in 443 port). Sorry for my bad english i hope you understand!!!

But there are some proxy variables that you can configure…

Thank for your reply back.

I did all the steps above but still the same issue.

ping www.apple.com
ping: www.apple.com: Name or service not known

Please if you have any suggestions let me know!

That error is related to dns.
See what it is happening with your /etc/resolv.conf

I’m not sure what to do with resolv.conf

Would you please provide more info.
I already added IPs as nameservers to file

Also why would it be able to see the address through a browser a not a terminal?

Mmmm… Maybe your proxy is blocking icmp.
Could you try wget www.apple.com?

What kind of proxy do you have?
For example, me at work must pass by an isa server, so i have to put another proxy between the enterprise proxy and my system…

–2018-05-03 18:12:47-- http://www.apple.com/
Connecting to proxyip:port… connected.
Proxy request sent, awaiting response… 301 Moved Permanently
Location: link [following]
–2018-05-03 18:12:47-- link
Connecting to --2018-05-03 18:12:47-- link
Connecting to proxyip:port… connected.
Proxy request sent, awaiting response… 301 Moved Permanently
Location: link [following]
–2018-05-03 18:12:47-- link
Connecting to proxyip:port… connected.
Proxy request sent, awaiting response… 200 OK
Length: 49426 (48K) [text/html]
Saving to: ‘index.html’

index.html 100%[===================>] 48.27K --.-KB/s in 0.09s

2018-05-03 18:12:48 (515 KB/s) - ‘index.html’ saved [49426/49426]
:port… connected.
Proxy request sent, awaiting response… 200 OK
Length: 49426 (48K) [text/html]
Saving to: ‘index.html’

index.html 100%[===================>] 48.27K --.-KB/s in 0.09s

2018-05-03 18:12:48 (515 KB/s) - ‘index.html’ saved [49426/49426]

To post this mesaage I had to remove number of links, therefore link = www.apple.

This is what I got. There is a proxy ip address, and there is a pac. But I know that we only have one proxy. Thanks for your assistance once again!

Ok… You have it…The index.html you downloaded should be Apple.com
I think your proxy is filtering icmp so you can’t ping outside your network.

So, I launched ubuntu from usb to test.

Through ubuntu I was able to ping. So I don’t understand how I can’t ping using Parrot OS. It seems that the terminal settings in Parrot aren’t using proxy settings correct like firefox browser.

ubuntu@ubuntu:~$ ping www.apple.com
PING e6858.dsce9.akamaiedge.net (184.31.91.23) 56(84) bytes of data.
64 bytes from a184-31-91-23.deploy.static.akamaitechnologies.com (184.31.91.23): icmp_seq=1 ttl=51 time=149 ms
64 bytes from a184-31-91-23.deploy.static.akamaitechnologies.com (184.31.91.23): icmp_seq=2 ttl=51 time=147 ms
64 bytes from a184-31-91-23.deploy.static.akamaitechnologies.com (184.31.91.23): icmp_seq=3 ttl=51 time=154 ms
^C
--- e6858.dsce9.akamaiedge.net ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms

@gesala

I figured out the issue, it was anonsurf. You have to disable it even if you haven’t ran it in the first place. I’m able to connect now without issues. Thanks!

1 Like

brilliant!!nice to hear you resolv the problem

@gesala

The issue is back. This happened after I updated the OS to 4.16. AnonSurf is no longer included and was removed. In the past I would just click and stop AnonSurf and the issue with the proxy would be solved. Obviously, I can’t do that know. It seems Stop AnonSurf did something that configured the latest proxy settings to the terminal. So I have internet connection through a browser but can’t ping or connect to a git repo through a terminal.

There is something wrong with the way proxy is configured in a terminal.
I’m running 4.16, with older versions such as 3.XX I don’t face this issue.

I hope someone can resolve this issue.

Does it happen in all terminals?

Yes, it happens in all terminals.

I noticed one thing, when I add the proxy in network settings and I search for proxy via terminal. I see it show up twice. I wonder if it is being double set.

HTTPS_PROXY=http://xxx.xx.xxx.x:xxxx/
HTTP_PROXY=http://xxx.xx.xxx.x:xxxx/
NO_PROXY=localhost,127.0.0.0/8,::1
http_proxy=http://xxx.xx.xxx.x:xxxx/
https_proxy=http://xxx.xx.xxx.x:xxxx/
no_proxy=localhost,127.0.0.0/8,::1

I replaced number with an x

It shows up twice in all caps and lower case letters.

Where can I edit where it is set, if it being set twice?

One in network settings as you said… the other ones and if you followed my other advice you will find them in /etc/profile.d/proxy.sh

I’ve just created the empty file at /etc/profile.d/proxy.sh and that worked.