It's so hard to make rules

I want a program to only allow a UDP connection to come from port 6112. I set the program under these settings.

“Allow UDP In from IP Any to IP (my ip) where source port is 6112 and destination port is any.”
I also set it to log anything if the rule is fired.
I set another rule to block things that are not from 6112. This port is put in a group by itself called One Port. The rule for that is set up like this.
“Block UDP In from IP Any to IP (my ip) where source port is not IN One Port and the desination port is not IN One Port.”
Also set to be logged.

When I connected on the application, I continued to recieve connections from other ports.
What is the exact rules needed to make a program Allow TCP Out from the program and Block anything UDP that is not in port 6112? It’s because the current, common-sense rule in place does not work.

Also, whenever I click anything of help like “What do these settings do?” or things with that ? sign, I get a message from Microsoft Error Reporting Service Saying “COMODO Firewall Pro has encountered a problem and needs to close. We are sorry for the inconvenience.” and regardless of me pressing Debug or Close, my firewall gets turned off. I used the diagnostic tool given and it found no problems.

Try changing the “IP (my IP)” to “IP any”. You are probably using your LAN IP (192.168.x.y) and the UDPs are actually addressed to your WAN IP, then routed to you by NAT, and that may confuse Comodo. Your rule may only work if you do not have a router and re-enter your WAN IP every time you get a new one from your ISP DHCP or PPPOE. The other bug is well known, alleged to be part of those fixed this week in the next upgrade.

Why don’t you do it this way:

Rule 1.

Action: Allow
Protocol: UDP
Direction: In

Source Address: Any
Destination Address: Any
Source Port: 6112
Destination Port: Any

Rule 2.

Action: Block
Protocol: UDP
Direction: In

Source Address: Any
Destination Address: Any
Source Port: Any
Destination Port: Any

Just make sure that Rule 2 is below Rule 1 in the list.

under MaratR’s rules, I set it to log the events. Under exaclty what you said, in my logs, it says everything including port 6112 is being blocked! That didn’t help on bit. The problem is I can’t set the rules right to block everything except port 6112 without that port being blocked too.

Hmm…

OK, you have to allow communications coming from port 6112 on both system and application levels. I believe you have created the two mentioned rules in the application ruleset for the application you’re using, and Rule 1 precedes Rule 2 there, right?

You should also “allow source port 6112” on the system level now. Create the Rule 1 (same as above) in the Global Rules section, and make it the first rule there (so that connections from port 6112 are allowed before any other global rule blocks them). This should do it.

Could you post the screenshots of your Global Rules and Application Rules (the part of list where your application is)?

One more thing.

I’m sure you know what you’re doing, but just in case… do you really want to allow all connections incoming FROM a certain UDP port? Because that’s not something very usual. You usually bind a certain port to a SERVER application (the one accepting incoming connections), not to a CLIENT application (the one generating outgoing connections).

A more common case is a server application allowing incoming connections TO some port (not FROM some port). This is logical, because every client knows what port to send requests to. Are you sure that’s not something you’re trying to do?

Thanks, now it only lets those on port 6112. Truth is the application was StarCraft and Blizzard said to open port 6112. However, in my logs when I found out other people were using other ports than 6112, I thought it was a way for people to hack other people’s names. What I’ve also found is that when playing games with people on that port, games don’t lag much at all.