Thread: Help Me In Ports Please

  1. #1
    Registered User
    Join Date
    May 2012
    Posts
    6

    Question Help Me In Ports Please

    Hello everybody how are you .
    I am trying to make very simple firewall with one rule
    which is blocking packet that coming from specific port ( such as 80)
    and I am beginner in C++ and don`t know much about my work .
    I found many codes but it is complicated I want just to block traffic on
    port .
    Could you help me please .

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > and I am beginner in C++ and don`t know much about my work .
    Why do people think they can go from "hello world" to "write a simple firewall" in one easy step?

    Now you can write a simple server to listen on port 80 and just send back a disconnect for every connection.
    Client-Server Background

    But an actual firewall would work at a much lower level (and be a lot harder to achieve), and be far more specific to your OS/Compiler.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    May 2012
    Posts
    6
    thanks Mr Salem to your help but I saw these websites before I registered here and I want something more simple . Just I want to tell you that I want this simple firewall to add it to my program which is completely sniffer and spoof packets and I said I am beginner it is because there are not anyone professional in any thing and it is kind of humility because maybe you are professional and you can not resolve some problems but beginners do thank you again and sorry but your answer forced me to response you. thank you all .

  4. #4
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    I've been programming in C and C++ for ten years on Windows, and even I couldn't tell you how to make a firewall.
    To put it plainly, it is far above what you as a beginner should even consider looking into.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > I saw these websites before I registered here and I want something more simple .
    Beej's tutorials are as simple as network programming gets. If you can't deal with that yet, you're stuck.

    > to add it to my program which is completely sniffer and spoof packets
    What exactly does this mean?

    Why do I get the feeling you've just "found" some hack code on the web and you want to make it do something else without actually understanding anything at all.
    Certainly, if you didn't understand Beej, then you didn't write the rest of your "spoof" code either.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Ports and so forth...
    By doubleanti in forum Tech Board
    Replies: 7
    Last Post: 01-04-2004, 02:58 PM
  2. Ports
    By KrAzY CrAb in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 03-03-2003, 12:25 AM
  3. COM-ports
    By Unregistered in forum C++ Programming
    Replies: 0
    Last Post: 04-16-2002, 05:38 AM
  4. COM ports
    By Govtcheez in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 03-15-2002, 09:36 AM
  5. COM-ports
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 02-15-2002, 06:07 AM