Block port 80 allow port 55 from application

I would like to block port 80 and allow port 55 for application inetinfo.exe.


Removed inetinfo.exe which was already there because I allowed it when I got alerted for connection.
Clicked “Add…” and then “Select running process” and selected “inetinfo.exe”.
Then I selected “Use a custom policy” and on the bottom pressed “Add…” and made this options:
Source address: ANY
Destination address: ANY
Source port: 55
Destination port: 55

Pressed APPLY, and then clicked “Add…”. again with this options:
Source address: ANY
Destination address: ANY
Source port: 80
Destination port: 80

Pressed APPLY, and then clicked “apply” again.

After that all should be set people should not be able to access my PC at port 80 and should be able to do so from port 55, but the problem is that every time someone connects I get COMODO Firewall ALERT about connection and I have to select to allow request or Block it… If I block it all ports are blocked for that person, but if I allow it all ports are open for that person, he can also access port 80 even though I blocked it before… What am I doing wrong, I selected from any IP why does the firewall still asking me what to do when someone connects to that port?

I don’t know anything about inetinfo.exe, but a few questions. Are you running an http web server or ? In general, the destination port is 80 (or 55 if you like) but the source port can be “any” higher order port on the client. Suggest you separate the in and the out, since source and destination sometimes become confused. And use rule that allows source port to be any.

I am running IIS and I have FTP on port 55 and I want it to be enabled so that I can add files from other PC and I want my web server on port 80 to be closed so that I can only use it local on my PC.

Again, I don’t run IIS, but more questions: Are you using active or passive ftp? Is there some reason you are using port 55 instead of port 21? See if helps. If you want to block port 80, normally the source can be any high order port in the client. If you want CFP to generate more focused rules automatically, that don’t allow all the ports, go to Firewall Behavior Settings and set alert settings to high or very high.

It doesn’t matter even if I use port 21 it’s the same thing, I am always asked to allow/block when someone connects to FTP on port 21 or try to access my webserver on port 80…If I allow any of them both re allowed or if I block any of them both are blocked becuse new “rule” is added next to two of mine and the new one has IP from PC which tried to conenct to me.

It is just like those 2 which I created are not active or that they don’t apply for all IPs.

Have you tried the source port set as “any”? As in allow/tcp/in/any/any/any/55
block/tcp/in/any/any/any/80 ? Are you using active or passive ftp? The return channel is quite different depending on your choice.

I think that it works now. There was just one problem - when I connect from other PC to my FTP even if it is set to port 21 or 55 I got warning for port 1078 or next time 1079 or 1080… Probably that FTP uses 21 + some set of 1070-1090 or something like that… Well since I only want port 80 to be blocked for this app I used block/tcp/in/any/any/any/80 and block/tcp/in/any/any/any/80 - EXCLUDE (that is probably all ports except port 80). And I think this works I only tested on 1 PC I’ll test a bit more later but so far so good!

Thanks alot sded :-TU

Glad it works for you. Remember that port 21(or 55) is just the control channel for ftp, and that you also have to allow a data channel either active or passive as in the referenced article above and you should be fine. Check with IIS to see if it will limit the high level ports used-some ftp servers do that so the firewall ports can be more restricted.