Results 1 to 20 of 23

Thread: Allowing connections outside of LAN

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2012
    Posts
    27
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    4

    Default Re: Allowing connections outside of LAN

    Quote Originally Posted by ChrisW67 View Post
    OK, it is listening for connections on any interface.

    From your server can your client connect to 127.0.0.1 on port 1234?
    No: The client or server code is faulty
    Yes: Carry on

    From a machine on your LAN other than the server can your client connect to server's LAN IP address?
    No: The problem is quite probably your server's own firewall. Windows firewall or anti-virus perhaps?
    Yes: Carry on

    Install Wireshark or a similar tool on your server machine. Start a capture. For a machine outside your network can your client connect to the server?
    Yes: Problem solved
    No: Carry on

    Did you see the attempt to connect to port 1234 in Wireshark?
    No: Problem is the firewall or port forwarding from your external connection.
    Yes: Problem may still be a firewall on the server itself if it restricts by source IP address.
    Thanks for that information, I just tried to connect to my server on another computer on my network (using telnet in command prompt because my client program doesn't work on windows xp yet) and that worked when I connected to 192.168.0.4. I've installed wireshark so I can test with another computer outside my network (well, as soon as someone comes on skype for me to test it with ). I just noticed that my antivirus program was blocking some TCP connections, so I allowed port 1234 through. Hopefully I can get it to work soon :/

  2. #2
    Join Date
    Dec 2012
    Posts
    27
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    4

    Default Re: Allowing connections outside of LAN

    Yay it works

    Only thing that's concerning me now is... is the connection safe? I've had to allow port 1234 to connect through my antivirus and firewall, and there's no password on the server. Is there a simple way of adding a password to the server so I can just tell the password to whoever I want to be able to connect?

  3. #3
    Join Date
    Feb 2010
    Posts
    96
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    4
    Thanked 5 Times in 5 Posts

    Default Re: Allowing connections outside of LAN

    Once a client connects they are connected. The password method would limit their functionality until the correct password is sent by the client. Just force the client into a password loop until they send the correct password and then disconnect them after failed atempts.

    For an added security layer you can create a 'too many attempts' feature that prevents an IP from going past the listening method if they have attempted too many passwords. I'd probably use an XML file for this so you can store the IP and a time stamp, and when a connection attempt is made run a check on their IP and if it is found close the connection. Using a similar feature you could allow IPs to bypass the password method for a limited time.

  4. The following user says thank you to prof.ebral for this useful post:

    ben1996123 (10th December 2012)

  5. #4
    Join Date
    Dec 2012
    Posts
    27
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    4

    Default Re: Allowing connections outside of LAN

    Quote Originally Posted by prof.ebral View Post
    Once a client connects they are connected. The password method would limit their functionality until the correct password is sent by the client. Just force the client into a password loop until they send the correct password and then disconnect them after failed atempts.

    For an added security layer you can create a 'too many attempts' feature that prevents an IP from going past the listening method if they have attempted too many passwords. I'd probably use an XML file for this so you can store the IP and a time stamp, and when a connection attempt is made run a check on their IP and if it is found close the connection. Using a similar feature you could allow IPs to bypass the password method for a limited time.
    Ok, thanks for all the help

Similar Threads

  1. Replies: 2
    Last Post: 30th March 2011, 20:20
  2. QActionGroup allowing unchecking ?
    By divide in forum Qt Programming
    Replies: 0
    Last Post: 29th June 2010, 14:16
  3. Layouts and allowing view to stretch with main window
    By steg90 in forum Qt Programming
    Replies: 1
    Last Post: 15th May 2007, 10:30
  4. Allowing external events to fire during a tight loop
    By hardgeus in forum Qt Programming
    Replies: 6
    Last Post: 28th December 2006, 15:24
  5. QTable - allowing it to only enter ints
    By therealjag in forum Qt Programming
    Replies: 2
    Last Post: 14th February 2006, 17:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.