Jump to content

Recommended Posts

Posted

I've been trying to setup my Orange PI PC to be my file/media server.

 

I used a "HOW-TO" on setting up a static IP address.  It seems like it is working for me except I can't seem to connect to the outside world.

 

In the process of setting up my samba server, I have found that I have no internet connection because I can't run "apt-get update" and if I open a browser I can't reach any web-page.

 

Does anyone have a first step or idea to get me setup correctly?

 

Samba post to come in separate thread.

Posted

I'm still a little confused on the dns-nameserver concept.

 

This is a home application and the network is pretty simple.  I currently have a single wireless router that this OrangePI PC is connected to through Ethernet.  Pretty much everything else is connected through wifi.

 

Would I still require a dns-nameserver setting?

 

I don't currently have an entry for that, could that be my problem?

Posted

Yes, it is most probably the reason why you can't reach internet using hostnames.

When setting a device with static IP, it is is up to you also to configure DNS server, while using DHCP from router, this router is providing not only an IP but also it own DNS setting.

If you try to "ping 8.8.8.8"  or even better "traceroute 8.8.8.8", you will see that your internet is working when using IPs only.

Then, you can configure your DNS settings ...

Posted

Ok. After fouling up my eth0 settings, I think I'm back on the network.  I was able to see my network share on another computer on the network but still not access it.

 

I added the dns-nameservers 8.8.8.8 and 8.8.4.4 but no luck with updating or loading web pages.  Here is my interfaces file:

source /etc/network/interfaces.d/*

# The loopback network interfaces
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.190
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 8.8.8.8
dns-nameservers 8.8.4.4

# Wireless adapter #1
# Armbian ships with network-manager installed by default. To save you time
# and hassles consider using 'sudo nmtui' instead of configuring Wi-Fi settings
# manually. The below lines are only meant as an example how configuration could
# be done in an anachronistic way:
# 
#allow-hotplug wlan0
#iface wlan0 inet dhcp
#address 192.168.0.100
#netmask 255.255.255.0
#gateway 192.168.0.1
#dns-nameservers 8.8.8.8 8.8.4.4
#   wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
# Disable power saving on compatible chipsets (prevents SSH/connection dropouts over WiFi)
#wireless-mode Managed
#wireless-power off

Are there different dns-nameservers that I could try or am I missing something?

 

Thanks!

Posted

as DNS you could also try the 2 DNS-IPs of OpenDNS:

208.67.222.222 and 208.67.220.220

 

but the 8.8.8.8 and 8.8.4.4 should mostly be available. 

 

Is the 192.168.0.1 really your Gateway (mostly the IP of your Router)? 

 

Without the correct Gateway you wouldnt reach the DNS and without DNS you wouldnt reach the Internet via DNS-Name

 

So if your Gateway is reachable and work you should be able to

ping 8.8.8.8

Posted

It is the IP of my router.  If i run ipconfig on a Windows machine, that is the gateway that it uses and I am able to log into the router to change settings.

 

When I logged into my router, I found that it listed two DNS servers, a primary and secondary.  I added both of those to interfaces file and it still doesn't work.

 

I was able to ping 8.8.8.8 and when I stopped the pinging, it said there was no loss in over 30 pings.  Does that mean that it was able to access it?

 

Finally, does it cause issues if I put in more than two DNS server IPs?  I just did some looking and everything I saw just talked about a primary and a secondary.  I suppose you shouldn't need more than two if they were working.

Posted

This is mine with your IP and Gateway.  notice the # in front of source /etc/network/interfaces.d/*



#source /etc/network/interfaces.d/*

 

# This file intentionally left blank

#

# All interfaces are handled by network-manager, use nmtui or nmcli on

# server/headless images or the "Network Manager" GUI on desktop

 

auto lo eth0

allow-hotplug eth0

iface lo inet loopback

iface eth0 inet static

        address 192.168.0.190

        netmask 255.255.255.0

        gateway 192.168.0.1

        dns-nameservers 8.8.8.8

 

Posted
On 03/11/2017 at 6:14 PM, hazardsneon said:

I was able to ping 8.8.8.8 and when I stopped the pinging, it said there was no loss in over 30 pings. 

Does that mean that it was able to access it?

Finally, does it cause issues if I put in more than two DNS server IPs?  I just did some looking and everything I saw just talked about a primary and a secondary.  I suppose you shouldn't need more than two if they were working.

Yes - your system could ping 8.8.8.8 over 30 times. So connection to the internet s there - but without DNS-resolving.
You could try to ping a DNS-Name like:
 

ping armbian.com

 

No - thats OK to have more than one DNS-Server :) but you could configure them with one line (one space between the IPs):
 

dns-nameservers 8.8.8.8 8.8.4.4

 

Posted

I will definitely try commenting out the "source..." line.

 

Otherwise I am puzzled.

 

Over the weekend I checked my current "server" that is just a win7 PC sitting in the corner of my office and running "ipconfig".  It has the same gateway and netmask as I have setup in my Orange PI PC setup.  I wasn't sure if there was a possibility that those could be different between a wireless and wired connection.  Apparently in my situation, they are not.

Posted
1 hour ago, hazardsneon said:

I will definitely try commenting out the "source..." line.

 

Mine isnt commented out (but one of the last via /etc/network/interfaces - now using nmtui since debian stretch):

root@nanopiduo:~# more /etc/network/interfaces
source /etc/network/interfaces.d/*

# Wired adapter #1
# allow-hotplug eth0
# no-auto-down eth0
# iface eth0 inet dhcp

auto eth0
iface eth0 inet static
address 192.168.6.113
netmask 255.255.255.0
gateway 192.168.6.1
dns-nameservers 192.168.6.3

192.168.6.3 is my own DNS-Server because Iam using pi-hole :)

https://pi-hole.net/

Posted

I haven't tried to use the browser because I disconnected the keyboard, mouse and monitor but I am now able to updgrade!

 

I commented the source line now I can run "sudo apt-get upgrade" and I am now up to date.  I was not able to do this before commenting the line.

 

Thanks for the help!!

 

On to troubleshooting my other issues. :)

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines