1
I'm having trouble publicly accessing a MediaWiki server that I have set up on my Raspberry Pi. I am getting a "connection timed out" error when trying to visit the server remotely. It is however accessible to all computers on my LAN.
This doesn't seem to be an issue with my router or the port forwarding, as I can change the destination IP to that of my Macbook and publicly access an Apache server set up on it.
I have made sure that ufw is inactive, and have used iptables to add rules allowing HTTP traffic. The output of sudo iptables -L
is below.
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:http state NEW,ESTABLISHED
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp spt:http state ESTABLISHED
Running netstat -l
gives the following:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 localhost:postgresql *:* LISTEN
tcp 0 0 localhost:4700 *:* LISTEN
tcp 0 0 *:microsoft-ds *:* LISTEN
tcp 0 0 *:afpovertcp *:* LISTEN
tcp 0 0 localhost:mysql *:* LISTEN
tcp 0 0 localhost:6379 *:* LISTEN
tcp 0 0 *:netbios-ssn *:* LISTEN
tcp 0 0 *:http *:* LISTEN
udp 0 0 *:26592 *:*
udp 0 0 *:mdns *:*
udp 0 0 *:42516 *:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
Is there a way to log what exactly is going on with this request on the Pi?
1It turned out that my gateway for the wlan0 interface (I'm not using ethernet) was set to 0.0.0.0, so I couldn't establish outgoing connections from the Pi. Changing it to the IP of my router solved the issue. Trying to install tcpdump alerted me to this issue. – Max Gillett – 2016-02-15T22:21:05.433