0

I've got a port forwarding issue on my Pi.

I have 2 Pi's running and listening with the same server software, Pi's listening respective on ports ie 8005 and 8006, one pi has 8005 and the other 8006 to serve a streaming Pi cam page.

I have my router setup the same for both these ports, but only one port forwards OK to WAN.

I can see each pi's page OK when I visit Locally on the routers network, but only one of the Pis forward outbound to the public IP my router is connected to. The other timesout when I visit it's page. No HTTPS setup.

I'm unsure the diagnostics steps and settings / things to check to isolate this issue. I wouldn't put it past the router to be funky, but I speculate it's working, since it's only selective to not work on that particular Pi's configuration.

I tried changing ports, nothing. Isolated just the 'bad' pi, removing all fwd settings in the router but that one, same results.

iptables -L shows nothing. I know some of the network settings was tinkered with in the past so the Pi would create its own AP when not connected to a specific wpa_supplicant, so maybe somewhere in there my network settings are off.

I may need to raise this question within the linux networking StackExchange realm, but since it's Pi related, I'd thought I'd start here first.

Working Pi : ip addr - returns:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
       link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
       inet 127.0.0.1/8 scope host lo
          valid_lft forever preferred_lft forever
       inet6 ::1/128 scope host
          valid_lft forever preferred_lft forever
   2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
       link/ether b8:27:eb:37:77:12 brd ff:ff:ff:ff:ff:ff
       inet6 fe80::26cb:1dca:3b32:c6f3/64 scope link tentative
          valid_lft forever preferred_lft forever
   3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
       link/ether b8:27:eb:62:22:47 brd ff:ff:ff:ff:ff:ff
       inet 192.168.0.9/24 brd 192.168.0.255 scope global wlan0
          valid_lft forever preferred_lft forever
       inet6 fe80::e4d4:413a:11ba:7cb9/64 scope link
          valid_lft forever preferred_lft forever

Failing Fwd Pi returns:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether b8:27:eb:83:63:37 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::6e1d:3c1d:367d:c31d/64 scope link tentative
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:d6:36:62 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.29/24 brd 192.168.0.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 fe80::aaba:7f60:b76a:6f4/64 scope link
       valid_lft forever preferred_lft forever

ip route:

Working pi:

default via 192.168.0.1 dev wlan0  metric 303
192.168.0.0/24 dev wlan0  proto kernel  scope link  src 192.168.0.9  metric 303

Failing Fwd Pi:

default via 192.0.0.1 dev wlan0  metric 303
192.0.0.1 dev wlan0  scope link  metric 303
192.168.0.0/24 dev wlan0  proto kernel  scope link  src 192.168.0.29  metric 303
  • Could you give more information on the problem. I.e. what server software are you running?, what do the logs for that software say?, you've set up port forwarding for both pi's I assume then there are 2 open ports on your router are you lncluding the relevant port in the URL your putting into the browser? What exactly is the error the browser presents you with. depending on your browser SSL errors can appear that you can't proceed past whereas in others you can ignore the SSL error and carry on. From what you've said above it could be that you've set the server to enforce SSL connections. – rohtua Feb 15 at 19:31
  • port forward to WAN? – Jaromanda X Feb 15 at 22:26
  • Please edit your question and add the output of these commands ip addr and ip route from each RasPi. – Ingo Feb 15 at 22:55
  • The network configuration looks good so far. I suspect it's the router and/or the port. Does always the same port fail? If so have you tried to change to the "running" port on the failing RasPi? Is there any NAT? – Ingo Feb 16 at 0:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.