Automatically forward ports from clients

Stav Alfi

My system has a server and multiple clients. the server has a service for the clients and each client has a service too, for talking to other clients.

I forward the server's service port manually on the router but the future client can not do it by him self after the installation.

Is there a way to automatically forward ports by code from the client side through the installation?

My main question is - Does this approach is wise? Should the system needs to be build deferentially?

Project details:

  1. C# - WCF, Communication - NetTcpBinding.
  2. The server is on my computer (Home network). Server's service port : 8080.
  3. The clients can be installed everywhere. Client's service port: 8081.

*I'm not known with the IIS technology, can it help in this scenario?

Chavez

The model you're describing sounds like a mesh network, generally you do not want clients to forward ports, be it automatically or not.

If it's absolutely necessary you could implement UPnP, there is an elaborate article here describing how to do so in .NET with a library. Note that you will have to select a different port.

I would strongly recommend to go for a different option though, having the server manage connections between clients is more managable and safer. There are very few valid arguments in favor of a model where a server is present and clients omit it at times:

  • Bandwidth, the server might not be able to handle all the data with reasonable throughput (i.e. torrent)
  • Security, the server might be only there for client updates (i.e. P2P chatclient with updater)

From the sound of it, your project does not apply to either.

EDIT: Because you have indicated the project is basically a torrent client, I would recommend reading up on the UPnP article.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Do ports placed in a blocking state by STP still forward normal traffic?

분류에서Dev

InnoDB mutual table lock from two clients

분류에서Dev

RDP into local server from 2 clients

분류에서Dev

How forward packets from network interface to another

분류에서Dev

Forward SSH port - Connect from other place

분류에서Dev

Forward events from a jQuery plugin to a React component?

분류에서Dev

Forward packets from bonded LAN interface to WAN

분류에서Dev

How to extract mapped ports from `docker ps`'s output

분류에서Dev

Print and connect Jack Audio and MIDI ports from the command line

분류에서Dev

Run a thread automatically from a WAR

분류에서Dev

'Unknown response from agent' from Openshift rhc port-forward

분류에서Dev

Mysql port forward and access from any pc outside network

분류에서Dev

Unable to forward X11 graphics from Centos on Vagrant

분류에서Dev

Windows 10 automatically disconects from VPN server

분류에서Dev

How to disable GDM from being automatically started?

분류에서Dev

Automatically downloading data from online database

분류에서Dev

Unable to receive data from clients ajax POST request through rest API

분류에서Dev

Impact from upgrading SQL Server 2005 SP3 Native Client have Connected Clients?

분류에서Dev

How to get all the IPs(or username) from server of the clients connected to a shared print object?

분류에서Dev

404 error accessing local IIS on Windows, access from other clients is fine

분류에서Dev

python - force input() to read newline character from a different thread and forward execution

분류에서Dev

Telegram 봇은 forward_from 사용자 ID를 가져옵니다.

분류에서Dev

Get the textbox to display values from Datetimepicker by using buttons to go forward or back through the dates

분류에서Dev

Router won't allow Port forward from 192.168.X.X

분류에서Dev

pfSense port forward for http(s) redirects to private internal ip address when coming from WAN

분류에서Dev

ModelAndView forward

분류에서Dev

How do I prevent ubuntu one from connecting automatically?

분류에서Dev

Will SharedPreferences be automatically deleted from the device once the app is deleted?

분류에서Dev

How to disable Firefox Portable from automatically loading plugins

Related 관련 기사

  1. 1

    Do ports placed in a blocking state by STP still forward normal traffic?

  2. 2

    InnoDB mutual table lock from two clients

  3. 3

    RDP into local server from 2 clients

  4. 4

    How forward packets from network interface to another

  5. 5

    Forward SSH port - Connect from other place

  6. 6

    Forward events from a jQuery plugin to a React component?

  7. 7

    Forward packets from bonded LAN interface to WAN

  8. 8

    How to extract mapped ports from `docker ps`'s output

  9. 9

    Print and connect Jack Audio and MIDI ports from the command line

  10. 10

    Run a thread automatically from a WAR

  11. 11

    'Unknown response from agent' from Openshift rhc port-forward

  12. 12

    Mysql port forward and access from any pc outside network

  13. 13

    Unable to forward X11 graphics from Centos on Vagrant

  14. 14

    Windows 10 automatically disconects from VPN server

  15. 15

    How to disable GDM from being automatically started?

  16. 16

    Automatically downloading data from online database

  17. 17

    Unable to receive data from clients ajax POST request through rest API

  18. 18

    Impact from upgrading SQL Server 2005 SP3 Native Client have Connected Clients?

  19. 19

    How to get all the IPs(or username) from server of the clients connected to a shared print object?

  20. 20

    404 error accessing local IIS on Windows, access from other clients is fine

  21. 21

    python - force input() to read newline character from a different thread and forward execution

  22. 22

    Telegram 봇은 forward_from 사용자 ID를 가져옵니다.

  23. 23

    Get the textbox to display values from Datetimepicker by using buttons to go forward or back through the dates

  24. 24

    Router won't allow Port forward from 192.168.X.X

  25. 25

    pfSense port forward for http(s) redirects to private internal ip address when coming from WAN

  26. 26

    ModelAndView forward

  27. 27

    How do I prevent ubuntu one from connecting automatically?

  28. 28

    Will SharedPreferences be automatically deleted from the device once the app is deleted?

  29. 29

    How to disable Firefox Portable from automatically loading plugins

뜨겁다태그

보관