port listening

This is a discussion on port listening within the Windows Programming forums, part of the Platform Specific Boards category; hi all I'm trying to create a simple proxy to allow a friend on my LAN to share my internet ...

  1. #1
    Registered User
    Join Date
    Dec 2003
    Posts
    7

    Question port listening

    hi all
    I'm trying to create a simple proxy to allow a friend on my LAN to share my internet connection, while monitoring his connections to deny access when his time is up

    I figure from other proxy documentation what I have to do is basicly open a port and wait for a call on it and then forward the demand to internet

    being a newB to Win programming, I dont have ay idea of how to do that

    Thanx

    Jo

  2. #2
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644

    Re: port listening

    Originally posted by winterflood_j
    hi all
    I'm trying to create a simple proxy to allow a friend on my LAN to share my internet connection, while monitoring his connections to deny access when his time is up

    I figure from other proxy documentation what I have to do is basicly open a port and wait for a call on it and then forward the demand to internet

    being a newB to Win programming, I dont have ay idea of how to do that

    Thanx

    Jo
    So....what are you asking?

    Do you want us to write the code of how to do it and give it to you?

    {BTW: This post isn't sarcasm}
    Last edited by Quantrizi; 12-22-2003 at 10:18 AM.

  3. #3
    Registered User
    Join Date
    Aug 2003
    Posts
    1,205
    Google is your friend here.

  4. #4
    Registered User
    Join Date
    Dec 2003
    Posts
    7

    woops Quantrizi

    Sorry....
    well, for a start, i'd like some advice on how to open ports and stuff (what bits of the win libraries and so on)

    If you could help me there I'll probably be able to find docs on them and figure out how to use them

    thx,
    Jo

  5. #5
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,671

  6. #6
    Nor
    Nor is offline
    h ֆhr s Nor's Avatar
    Join Date
    Nov 2001
    Posts
    299
    when you grow out of the "being a newB" stage and have a good understanding of hwo windows sorks check out this site.
    allows you to read all -raw- data from the network card.
    allows you to send raw data on the network chad.

    http://winpcap.polito.it/

    this is a very good libary. works for all windows os's i belive.
    great for sniffing out data on the network. WARNING if your not on a switchable hub then you will see all the trafic on your segment. ie if your lissening on the router/pc connected to the net. then you can lissen for stuff comming from bobs pc he trys to connect.

    also look up what router tables are. very importante.

    when bob trys to connect and is allowed you simple rewrite his source ip to the servers internet ip.(making the packet look like it came from the pc connected to the net and not bobs) then make a route table entry to foward and data that the server he connected to sends back at him. dont quote me on this but i think the destanation address has to be rewriten to. but windows might take care of this for you. dont know.

    this is a very simplified outlind of what you need to do. g/l
    [edit]
    just for a little note. there is more than a good chance of finding an easyer way to do this. say installing ics and setting up your OWN(as in codded by you) firewall and then just ban bobs ip when you fell like kicking him off line
    Last edited by Nor; 12-25-2003 at 12:40 PM.
    Try to help all less knowledgeable than yourself, within
    the limits provided by time, complexity and tolerance.
    - Nor

  7. #7
    Registered User
    Join Date
    Dec 2003
    Posts
    7

    Thumbs up thx

    thx all, I'll be digging my teeth into that

    Oh, and happy christmas


    Jonathan

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. FTP program
    By jakemott in forum Linux Programming
    Replies: 14
    Last Post: 10-06-2008, 01:58 PM
  2. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  3. Com Port Listening
    By W35 in forum C++ Programming
    Replies: 2
    Last Post: 07-18-2006, 12:39 PM
  4. How to do port listening in C++?
    By voodoosg in forum Networking/Device Communication
    Replies: 1
    Last Post: 06-07-2006, 12:40 AM
  5. Replies: 1
    Last Post: 10-03-2002, 09:52 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21