Block outgoing ports

This is a discussion on Block outgoing ports within the C++ Programming forums, part of the General Programming Boards category; Is there a open source firewall what I can edit to block a certain outgoing port when it is running?...

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    241

    Block outgoing ports

    Is there a open source firewall what I can edit to block a certain outgoing port when it is running?

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    You should be able to do that in the options.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Registered User
    Join Date
    Sep 2005
    Posts
    241
    I dont have a firewall tho

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    So get one. ZoneAlarm blocks outgoing ports unless you specifically open them.
    Last edited by CornedBee; 03-05-2006 at 03:27 PM.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Registered User
    Join Date
    Sep 2005
    Posts
    241
    yeah but I just want to block one or two ports to a specific ip address...

  6. #6
    Registered User
    Join Date
    Jun 2005
    Posts
    6,662
    Developing your own program to do this will take a lot more effort than simply grabbing ZoneAlarm and configuring it to allow all ports you want except the two you want to block.

  7. #7
    Registered User
    Join Date
    Sep 2005
    Posts
    241
    hmph ok, but i want to attempt to write a simple firewall in the near future, can zonealarm block specific packets?
    Also I dont think zone alarm and ICS dont get along very well..

  8. #8
    Registered User
    Join Date
    Jun 2005
    Posts
    6,662
    If you really want source for a packet filtering firewall, look up the pf program that is distributed with the OpenBSD operating system. It is available as source code (albeit under some licensing restrictions) and is almost certainly BSD operating system specific.

    One thing with firewalls (whether they just block ports, or do packet filtering) is that they need to get VERY intimate with the operating system to function. Under windows, most firewalls (eg zonealarm, or commercial offerings from Norton or Trend) make use of dedicated kernel mode drivers to allow them to intercept requests of a program to the OS related to ports and socket. If they didn't do that, it would be possible for malicious programs to bypass the firewall, which would be self defeating. Writing kernel mode drivers under windows (or the equivalent under other OSs) is a specialised skill for a dedicated few and the drivers are VERY difficult to write (even a minor bug can cripple an OS). Under windows, I'm not aware of any firewall program for which source code is freely available. The reason is probably that the authors of programs like Zone Alarm don't want to encourage amateurs to mess with the workings of their programs (in practice amateurs will probably get it wrong). Having been in a situation of getting complaints about a program that I wrote, in which I was blamed for a problem that was caused by someone else's modifications, I can understand authors of firewall programs being reluctant to give out the source.

  9. #9
    Registered User
    Join Date
    Sep 2005
    Posts
    241
    I woudl never be able to port that in my lifetime
    On other note I had to uninstall Zonealarm since it and ics dont get along
    Is that the only packet filter that you know of? (that blocks certain packets)
    Last edited by bikr692002; 03-05-2006 at 08:39 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 04:42 PM
  2. virtual ports
    By royuco77 in forum Networking/Device Communication
    Replies: 5
    Last Post: 07-02-2005, 11:33 AM
  3. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 11:36 AM
  4. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 10:37 AM
  5. pointers
    By fanaonc in forum C Programming
    Replies: 3
    Last Post: 11-17-2001, 02:18 AM

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