I’m a beginner in networking things but due to my ISP I can only open a certain range of ports in my router to be accessible from the outside of my network (something like ports 11000-11500).

That means I can’t open port 443 to access my reverse proxy from the outside. Is it possible to redirect all traffic that’s coming from one of the ports in the range to port 443 of my server?

I haven’t found that possibility in my router (Fritzbox 7530) so is there a way to do this on my server (running Fedora Server)?

4 points

Yes, you can do it on your server with a simple iptable rule.

I’m a little rusted, but something like this should work.

iptables -t nat -A PREROUTING -d [your IP] -p tcp --dport 11500 -j DNAT --to-destination [your IP:443]

You can find more information searching for “iptables dnat”. What you are saying here is: in the prerouting table (ie: before we decide what to do with this packet) tcp connections to my IP at the port 11500 must be forwarded to my IP at port 443.

permalink
report
reply
2 points

Short answer, yes, you can forward port 11500 to port 443, but it means you’ll have to go to www.yourdomain.com:11500 and this may or may not work great with you applications inside the network depending on how they are set to run.

permalink
report
reply
0 points

That’s what I thought.

permalink
report
parent
reply
2 points

If you are hosting for yourself, you can use something like Tailscale to access your server from outside.

permalink
report
reply
2 points
*

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

Fewer Letters More Letters
IP Internet Protocol
NAT Network Address Translation
SSH Secure Shell for remote terminal access
VPS Virtual Private Server (opposed to shared hosting)

[Thread #949 for this sub, first seen 3rd Sep 2024, 14:45] [FAQ] [Full list] [Contact] [Source code]

permalink
report
reply
5 points

Yes that is possible. You can select in the UI that port A forwards to local Host B to Port B.

permalink
report
reply
-10 points
*
Deleted by creator
permalink
report
parent
reply
6 points

You could’ve only posted less info if you hadn’t posted at all…

Edit: Anyone who downvotes me here: This comment I commented doesn’t specifiy which UI of which software therefore it’s a pretty useless comment.

  1. you are not entitled to an answer by anyone.
  2. you are already there. Your router does support that, you just need to select it in the UI.
permalink
report
parent
reply
-4 points
Deleted by creator
permalink
report
parent
reply

So, here’s a page from the online manual that specifies how to do this specifically for the FritzBox 7530

https://en.avm.de/service/knowledge-base/dok/FRITZ-Box-7530/893_Configuring-static-port-sharing-in-the-FRITZ-Box/

Based on the original post though I am 100% sure that OP has already seen this page, already tried it, and therefore knows that the warning under 2.10.b. applies to the OP’s case (i.e. FritzBox doesn’t allow it from UI because the ISP doesn’t allow it - that honestly had me wondering just how the FritzBox knows the ISP doesn’t allow it, but that’s a different topic).

permalink
report
parent
reply
1 point

that honestly had me wondering just how the FritzBox knows the ISP doesn’t allow it, but that’s a different topic

Because the Fritzbox uses a DS-Lite tunnel.

permalink
report
parent
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 4.8K

    Monthly active users

  • 3.5K

    Posts

  • 75K

    Comments