Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 4508  / 1 Year ago, tue, november 29, 2022, 1:29:45

So I found out my problem when I would use the curl method on my linux Ubunutu 12.10 Server at home while logged in from my laptop (Mac OSX Lion). Nothing was happening when I would use the curl method so I thought I would try to ping a website where I know its up and running and I would get this:



ping: unknown host facebook.com


So Im guessing there is something blocking something here. I tried other sites with no success. Just the same error. I researched elsewhere but I couldn't really find a solution.



I typed this in terminal:



sudo iptables -L


...and I got this response



Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination


Does that look fine to anybody or should there be more information in there?



Update



I should also add that I am pretty new to hosting my own server and I have a Dynamic IP at the moment and not a static one. I have learned a lot over the past short while but just want to give the heads up that I may not know a whole lot about it.



That being said everyone seems to think its a DNS issue. So I checked the etc/resolv.conf file and there wasn't anything in there except a commented message.



# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN


Did I forget a step when setting up my server? Also would this fix the curl issues I was having. I was just trying to install RVM by curl according to the tutorial but nothing happened. No message that it failed or succeeded.



Update 2



So I did some research and it looks like a known bug with Ubuntu 12.10 upgrade, which I had just did before using these commands.



DNS resolution fails after 12.10 upgrade



I thought the above was causing the problem but it wasn't in my case



Here is what reads inside /etc/network/interfaces



# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.131
netmask 255.255.255.0
gateway 192.168.1.1


Thanks,



Joe


More From » ssh

 Answers
0

Agreed, this is a DNS resolution error. You can verify this by pinging facebooks actual IP:


# ping 173.252.110.27
# 64 bytes from 173.252.110.27: icmp_seq=0 ttl=239 time=124.665 ms
# 64 bytes from 173.252.110.27: icmp_seq=1 ttl=239 time=83.031 ms

If pinging the IP fails, it's likely a network issue. If it succeeds, it's likely a dns issue.


UPDATE


Based on new information:


I'll assume (and if I'm wrong, I'll need to know a lot more about your setup) that you have a typical broadband internet service provider, and a typical consumer grade router that your other machines connect to just fine. If that is the case, you should comment out the last 5 lines and add this at the end:


auto eth0
iface eth0 inet dhcp

Then perform these commands:


# sudo ifconfig eth0 down ; sudo ifconfig eth0 up ; sudo dhclient

Let me know if anything errors out.


[#32827] Wednesday, November 30, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lowovey

Total Points: 287
Total Questions: 98
Total Answers: 117

Location: Bosnia and Herzegovina
Member since Thu, Jan 14, 2021
3 Years ago
;