7
1
Background: I am trying to set up a rasberry pi server. Everything was going well and my pi could apt-get update etc, until I got the port forwarding to work and ssh to work outside of the LAN. I have been trying to get a webpage up as well so I created a port forward for a port other than 80, since my ISP was blocking it.
Problem: After getting access to the pi by ssh outside LAN, I was unable to use apt-get or get any connection to websites with my pi. The ping is still working well though.
What I have tried: I have tried many different configurations of the iptables, as well as completely flushing it and starting over several times with configurations people have suggested. None of it seems to work. At the moment, the iptables are completely flushed.
Here is an example output of the pings and wget/curls:
pi@raspberrypi:~$ sudo apt-get update
0% [Connecting to mirrordirector.raspbian.org (5.153.225.207)] [Connecting to w^Cpi@raspberrypi:~$ wget -q -O- google.com
^C
pi@raspberrypi:~$ ping google.com
PING google.com (74.125.224.98) 56(84) bytes of data.
64 bytes from lax02s19-in-f2.1e100.net (74.125.224.98): icmp_req=1 ttl=52 time=58.8 ms
64 bytes from lax02s19-in-f2.1e100.net (74.125.224.98): icmp_req=2 ttl=52 time=53.8 ms
64 bytes from lax02s19-in-f2.1e100.net (74.125.224.98): icmp_req=3 ttl=52 time=62.2 ms
64 bytes from lax02s19-in-f2.1e100.net (74.125.224.98): icmp_req=4 ttl=52 time=71.2 ms
64 bytes from lax02s19-in-f2.1e100.net (74.125.224.98): icmp_req=5 ttl=52 time=67.3 ms
^C
--- google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 53.846/62.705/71.224/6.137 ms
pi@raspberrypi:~$
I have to ctrl-c out of the tasks obviously because they hang, but that's the output.
Does anyone know what other problem may be causing this?
EDIT
I found the problem was somehow my ip adress was added to the port blocking in my router, so if you have similar problems check that even if you don't believe you touched it.
if you are pinging the public address of a system that is performing port forwarding, you are pinging the router, not the server. are you pinging the server from within or outside its LAN? I'd also install UFW and make sure it is configured to allow outgoing connections and incoming responses. iptables is powerful, but often unnecessarily complicated. – Frank Thomas – 2015-01-14T17:41:59.563
I am trying to ping addresses outside my LAN from my server. I would like the server to have the ability to connect to the internet and download files as needed so I can ssh into it and do work or add things as necessary. – chase – 2015-01-15T01:06:30.283
OK, this seems pretty confusing now. So you have a your machine (call it rp) behind your router and you have forwarded ssh and http on say 8080 port to your rp on your router and after this your rp cannot ping Google or download files from Internet? – Mahdi – 2015-01-15T02:03:47.567
Almost - everything you said except it actually can ping, just not download. – chase – 2015-01-15T02:31:39.623
post your pi's iptables and your router's configuration. – gogators – 2015-01-15T19:12:58.237