sakaki- / gentoo-on-rpi-64bit

Bootable 64-bit Gentoo image for the Raspberry Pi4B, 3B & 3B+, with Linux 5.4, OpenRC, Xfce4, VC4/V3D, camera and h/w codec support, weekly-autobuild binhost
GNU General Public License v3.0
921 stars 126 forks source link

port open #121

Closed deveworld closed 4 years ago

deveworld commented 4 years ago

How to open port 19132?

sakaki- commented 4 years ago

Hello @mcsim415,

sorry, I don't quite understand what you are asking here? The image, as shipped, does not actively firewall inbound connections (although this can of course be turned on easily enough).

Is there a particular service, using this port, that you'd like to enable?

Best, sakaki

deveworld commented 4 years ago

I couldn't find service command. How can i do? Screenshot_20191202-082325

sakaki- commented 4 years ago

Try rc-service iptables save?

deveworld commented 4 years ago

Oh. It's working. Screenshot_2019-12-02-15-09-16

deveworld commented 4 years ago

Um.. It isn't working.. Screenshot_2019-12-02-15-24-51 Screenshot_2019-12-02-15-25-02

deveworld commented 4 years ago

22 port is open. But 19132 port is close..

deveworld commented 4 years ago

In fact, I can't use Linux well..

sakaki- commented 4 years ago

You need a service listening on this port also. Try running netstat -vatn and netstat -vaun to see which TCP and UDP services are running, on which ports.

deveworld commented 4 years ago

Screenshot_2019-12-02-19-09-01

deveworld commented 4 years ago

I want open my minecraft pe server!

deveworld commented 4 years ago

Ummm

sakaki- commented 4 years ago

OK, from your netstat output, you have a UDP service listening on port 19132, presumably pocket minecraft protocol.

As such, you need to allow inbound connections on that port for UDP (rather than outbound connections for TCP, which is what you did above).

Try:

# iptables -P OUTPUT ACCEPT
# iptables -I INPUT 1 -p udp --dport 19132 -j ACCEPT

verify your ruleset with

# iptables-save

hth, sakaki

deveworld commented 4 years ago

Ummm.? Screenshot_2019-12-03-16-13-54

sakaki- commented 4 years ago

OK, so as I suspected, the port is open (you have in fact many rules ^-^ inserted to do that, and also, the default stance for INPUT is ACCEPT too; so nothing on this local firewall is in fact blocking you — which is as I would have expected, unless you had explicitly set up something to the contrary).

You also (per your netstat -vaun output earlier) have a service listening on this port, on all interfaces.

So you should be able to connect to this service OK. Check the IP address of your RPi using ifconfig, and then try to connect from another system on your local network first. Once that works, you can ensure port forwarding etc. on your external router is working.

deveworld commented 4 years ago

I'll check it port state soon.

deveworld commented 4 years ago

Oh my gosh...

deveworld commented 4 years ago

It is still close

sakaki- commented 4 years ago

The issue is likely with your external router allowing / forwarding port 22, but not your target port. You need to fix that. The issue is not with the Pi.

Anyway, I am closing this issue and blocking you as a user, since your post above contains inappropriate sexual imagery.

I have reported this also to GitHub.

S.