Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6350571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:50:09+00:00 2026-05-24T21:50:09+00:00

I have to make my router to forward the data received from server(www.server.com:1112) through

  • 0

I have to make my router to forward the data received from server(www.server.com:1112) through some port xxxx to my iPhone application. I don’t have any idea.
My application listens the port but while server sends the data to the port xxxx, the router rejects that.

I did manual configuration in my router and it works fine. But I can’t expect all of the users to do the same and also I can’t force them to do such manual configuration. Can anyone help me please by providing a sample code for iPhone.

Thanx in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:50:11+00:00Added an answer on May 24, 2026 at 9:50 pm

    As you say you can’t expect users to manually open ports on their firewall, but you can’t expect that their firewalls will permit this in the first place.

    I’d suggest your best bet is to use uPNP and have compliant routers set up port forwarding for you, similar to BitTorrent. I’ve had luck with the TCMPortMapper framework, and it’s used in production in apps like subethaedit. To shamelessly rip from the documentation, opening a port is as simple as this:

    TCMPortMapper *pm = [TCMPortMapper sharedInstance];
    [pm addPortMapping:
    [TCMPortMapping portMappingWithLocalPort:1337 # local port iPhone listens on 
                        desiredExternalPort:13337 # remote port you want router to listen on
                          transportProtocol:TCMPortMappingTransportProtocolTCP
                                   userInfo:nil]];
    [pm start];
    

    Bear in mind:

    1. The above needs to be running continuously (which blocks the main thread) for the port to stay open. You’ll want to run it in the background and register for notifications. Read the documentation for more detailed examples.
    2. uPNP just ‘requests’ that a router open a given port. It can refuse, or it may not support it in the first place. There’s no way of guaranteeing it will succeed, although you can notify the user if it doesn’t. Your app will need to cater for this.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to make port forwarding from router ip to local ip how ?
For example I have make test # do other stuff 'make test' runs some
Actually I need to make a custom url like www.{mydomainname}.com/username, for which i added
Well i need to make it so any user can have a foo.com/username in
I have a project which requires logging in my router from time to time
I have to make some heavy queries in my datastore to obtain some high
On some opensource codes, why do they make use of: $router = Cfw_Router::getInstance(); Instead
I want to make customer route for url which have parameters. <a href='javascript:void(0)' onclick=window.location='<?php
I have make a procedure where two queries return values for a and b
I have make a new dropdown navi in css . Chrome, firefox, safari is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.