Advertisement

How To See A Router's Forwarding Table?

Started by August 09, 2016 03:03 PM
20 comments, last by Heelp 8 years, 3 months ago
Your server should listen on whatever port you were listening to before. Nothing about NAT or port forwarding changes that. 60000 is fine.

There is no problem if the external and internal ports are the same number - one is a port on the router, one is a port on your computer, and each device has its own set of ports.

To 'open' a local port means 2 things: first, that you're listening on it (that's what a Raknet server presumably does), and second, that your firewall allows traffic in. If you're on Windows, you probably get prompted to allow this, the first time your program attempted to open that port.

You don't need to 'open' your router's port - the port forwarding tells it that traffic for that port is to be redirected to an internal computer, and that is enough.

It's probably worth noting that Raknet uses UDP, as far as I can tell - so if you're setting up port forwarding for TCP, that won't work. Do it for UDP and you should be ok. (Also, if the port scanning website you used isn't scanning UDP ports, it'll never know whether you're listening on that port or not.)

Kylotan:

TCP/UDP chosen.

[attachment=32890:portForwarding.jpg]

Redirected to my PC- ludiqkomp. I guess this fills my internal IP.

[attachment=32891:portForwarding2.jpg]

Made an exception in my firewall.

[attachment=32892:firewallOn.jpg]

I'm doing a chatServer for my Paintball game, different names but the same thing, basically everything seems ok, I don't know what my pc wants anymore. And still when I check my router port 60000, it says that it is closed.

EDIT: Kylotan, you were right, all those websites I tried just check for TCP, I found an UDP checker, and it says my port is opened. Thanks, man.

Advertisement

GUYS, NOW IT WORKS. I JUST SENT A MESSAGE. Stupid firewall was the problem. Thanks very very much to everyone for the great help. Imagine I give you a big fat cookie.

I'm gonna code the shit out of this day ^_^ and tomorrow too

Sometimes I miss the bad old days when network hubs were not switches, when computers didn't have firewalls, when all IP addresses were right there on the public internet.

Networking was so easy when I first learned it. You could just reach out to a dotted quad and a port and it would talk with you.

Of course, in the modern world, such systems would be attacked by random strangers on the internet within a few hundred seconds. Depending on the source the average time for an unpatched machine to be attacked with a raw connection like that is anywhere from two to five minutes. Sad.

Congratulations on getting through the configuration hurdles. Hopefully now everything will fall into place. If you can implement raw communications, a basic chat with raw sockets, you can implement anything on top of it.

when all IP addresses were right there on the public internet


IPv6 (now reaching about 10% of the internet!) gives you that again.
The IETF currently believes that IPv6 doesn't need any NAT.
The official recommendation is that "correct firewall configuration is the user's responsibility."
I think that's short-sighted, because one of the main benefits of NAT is that users by default have a reasonable stateful firewall preventing their Windows network shares from being accidentally exposed to the internet.
enum Bool { True, False, FileNotFound };

//Made a post from my brother's acc by mistake.....
Advertisement

I thought the only reason someone came up with NAT is because IPs were not so much. Now that you added "security" to the equation, I started wondering: Ok, when you have a modem, all your devices connected to that modem are in a private network, because all of the modem's ports are closed and nobody from the outside can send a packet to any of your devices without your permission. Cool.

But when I tried connecting to my brother's laptop, I successfully connected using 192.168.something.something. So I actually sent that packet into the modem and the modem passed it into my brother's laptop, how does this works if all modem ports are closed? Why do I need to port forward to access the "outside", but not for PCs in my private net? Any ideas? :huh:

You're talking about sending messages across your internal network (the 192.168.x.x range is strictly for internal use). The ports that your modem (which is also a router) expose to the outside world are irrelevant for that.

Routers - in this case, your modem - are basically machines with 2 network interfaces. One for internal, one for external. Port forwarding is how it deals with taking unsolicited incoming traffic to the external interface and deciding who the internal interface will send it to (if anyone).

It does something very similar when you connect to a website and that website replies to your browser - except it's doing it automatically, remembering which of the internal computers asked for this data and passing it back to that computer when it arrives from the website.

So you say that passing packets between PCs in one internal/private network can happen even if all router ports are closed? :huh:

When we talk about a 'router port' we usually mean a port on the external interface, one that is theoretically accessible by the rest of the internet.

On your internal LAN, you're not using that external interface at all. All your router does is forward the messages to where they need to go, via the internal interface.

This topic is closed to new replies.

Advertisement