IP blocked in Rules but still accessing FTP
-
OK, I've attached more rules. You will see the bottom on is FTP but by being on the bottom, only access that hasn't already been blocked should get down the rule set this far. And yes, there is an FTP server, and yes, I know the difference, and yes, he's attempting to enter SSH commands on and FTP connection, and no, he shouldn't have gotten that far to do so and that's what I'm trying to figure out. How did he get to the bottom of the rule list if there's a specific block for his IP at the top of the list (right below Remotemanagement which only passes two IPs).
-
I don't understand. Remotemanagement only lists two fixed IPs for granting access.
Apparently not. Also, those pfBlocker rules are just whacky. I really don't think you have a clue what you are doing.
The pfBlocker rules are created by pfBlocker, not me. None of them are giving a pass to this guy's IPs. They're all blocks.
-
Let me repeat the port 22 is NOT FTP and libssh does NOT support FTP at all. What server are those logs from?
The pfBlocker rules are created by pfBlocker, not me. None of them are giving a pass to this guy's IPs. They're all blocks.
Yeah. Based on your whacky misconfiguration that's apparently trying to block the entire world.
OK, I've attached more rules.
Yeah. Looking at that censored mess… humble suggestion: go ditch that frenzy and restart from scratch. Or perhaps better hire someone for the job.
-
Port 22 is indeed routed to the FTP server and the FTP server is listening on that port as well as others. FTPFileZilla is the FTP server running.
And while you call this a "whacky misconfiguration", I'll point out again that support from pfSense has reviewed the configuration. Chris himself set up parts of it.
And yes, blocking most of the world would be just fine with me because our business isn't a world-wide business.
-
Sigh.
1/ No, port 22 is NOT routed to the FTP server. Not per the rules you posted.
2/ Oh, sure. Call me dalai lama.
3/ No. There's this implicit block all rule. Allow what you need from where you need ONLY. The rest is blocked. Not this ridiculous overhead with millions of table entries.Of course, when you keep sticking allow everyone from everywhere to anywhere any protocol in random places between some more random disabled rules, throw in a bunch of inexplicable rules with some random IP as destination, mix that with bunch more aliases to obfuscate the whole mess, then this most likely won't work properly, and you'll get people accessing what they shouldn't.
Those rules are frickin' unmaintainable mess with no logical ordering.
-
Yeah. Looking at that censored mess… humble suggestion: go ditch that frenzy and restart from scratch. Or perhaps better hire someone for the job.
LOL. So I should hire someone better than the guy who wrote pfsense? Right. Look, I get it, you enjoy punking up on me. Fine. But what you say sorta falls apart when you say things like Chris doesn't know how to setup his own software. If you think that little of him, why are you running his software in the first place? Can we stop the bully-bash and get back to the question of how an IP is able to reach the FTP server to even attempt his SSH command there? Of course it won't work, it's an FTP sever. That's beside the point.
-
Sigh.
1/ No, port 22 is NOT routed to the FTP server. Not per the rules you posted.
2/ Oh, sure. Call me dalai lama.
3/ No. There's this implicit block all rule. Allow what you need. The rest is blocked. Not this ridiculous overhead with millions of table entries.The alias FTPFilezilla passes port 22 to the server at that IP. The server on that IP is set to listen to port 22 for FTP. It's routed via the FTPFilezilla alias.
You don't like the pfBlocker package. I hear that. Don't install it then.
-
Don't pull Chris or anyone else into this shit. You cannot tell SSH from FTP and those rules are frickin' unmaintainable mess with no logical ordering, randomly plopped together. Ditch this crap. Noone will waste time debugging this mess with tons of inexplicable aliases and random allow entire world to anywhere rules in between.
As for pfBlocker, I was one of the pfBlockerNG beta testers. What I don't like is clueless people doing clueless things with that.
Flush the mess down the drain. Enough said.
-
Of course, when you keep sticking allow everyone from everywhere to anywhere any protocol in random places between some more random disabled rules, throw in a bunch of inexplicable rules with some random IP as destination, mix that with bunch more aliases to obfuscate the whole mess, then this most likely won't work properly, and you'll get people accessing what they shouldn't.
Those rules are frickin' unmaintainable mess with no logical ordering.
There are no random IPs as destinations. Yes I use aliases to keep the rule set simple. Yes there are some disabled rules which do nothing except for when enabled for short term use. There are no rules that allow all traffic from anywhere to anywhere except the one that limits the IPs themselves which is a rule put in by pfsense to restrict traffic to IPv4.
I could explain each rule in turn if you want, but since the rule in question is at the top as a block, the rules that follow it should be irrelevant to the problem.
-
I could explain each rule in turn if you want
No, thanks. The censored aliases and destinations and random disabled junk in between with blocks in completely whacky places are the exact opposite of simple. Get paid support.
(As a closing note, once you move your wide open FTP from the most targetted port in the world where it does not belong in the first place, you won't see people trying to breaking into your god knows what because they've mistaken it for SSH.)
-
Don't pull Chris or anyone else into this shit. You cannot tell SSH from FTP and those rules are frickin' unmaintainable mess with no logical ordering, randomly plopped together. Ditch this crap. Noone will waste time debugging this mess with tons of inexplicable aliases and random allow entire world to anywhere rules in between.
As for pfBlocker, I was one of the pfBlockerNG beta testers. What I don't like is clueless people doing clueless things with that.
Flush the mess down the drain. Enough said.
I'm just saying, you want to call it all crap but Chris worked on it and he didn't think it was crap. Many of the rules and aliases there were set up by him. I'm not "pulling" anyone into anything. I'm just saying, it made sense to him.
The rest is just name calling. You honestly think I don't know FTP from SSH? Come on! And the ports are routed for that. Could that port be routed to something else on a different server? Sure it could.. but it's not on this server. It's routed to the FTP server. That's beside the point. The point is he shouldn't be able to get to any port at all if he's blocked in a rule above that, and he is.
-
You just don't get it. Noone can see what's routed where, since you censored most of the stuff, you even censored the entire descriptions, and noone knows your aliases. There are no NAT rules shown anywhere. There's just giant disorganised mess. To each their own.
-
I could explain each rule in turn if you want
No, thanks. The censored aliases and destinations and random disabled junk in between with blocks in completely whacky places are the exact opposite of simple. Get paid support.
(As a closing note, once you move your wide open FTP from the most targetted port in the world where it does not belong in the first place, you won't see people trying to breaking into your god knows what because they've mistaken it for SSH.)
I did pay for support. As I've said, even Chris looked at it. They fixed the issue I was having at the time (DNS attack) and reviewed the entire system including all rules and all aliases.
-
Sure thing. If you pay 10 times that amount, maybe they'll redesign it from scratch. Unlike fixing your wide open DNS on WAN, that would take many hours.
-
You just don't get it. Noone can see what's routed where, since you censored most of the stuff, you even censored the entire descriptions, and noone knows your aliases. There are no NAT rules shown anywhere. There's just giant disorganised mess. To each their own.
Since you asked so kindly, here's my outbound NAT. Keep in mind again, that this pfsense is in transparent mode. Port 22, while used for SSH is used for other things as well. For example it's the default SFTP port which is what it's used for on this server as well. That port is routed via the FTPFilezilla Alias and is only allowed on one IP address, that of the FTP server as defined by the very last rule in the rule set.
-
Sigh. No, SFTP is NOT FTP. It's a completely different protocol. Terminology wrong, aliases confusing like hell, totally atypical configuration with NAT completely disabled or god knows what and probably some public subnet on LAN, messy rules, most information censored. How on earth you expect people to debug this? We don't have crystall balls. WTH is FTP doing the this thread's subject?! You know, you are confusing people that were trying to help and are wasting their time with this.
Look, dude, you are getting targetted exactly because "Port 22, while used for SSH is used for other things as well". When you open port 22 to the world, you'll get shitload of hits on it with people trying to bruteforce your SSH server. DUH! Move that Filezilla or god knows what shit where it belongs, as already suggested above.
-
Now, pretty damn convinced that your "WAN Net" rule (already mentioned), combined with the "wonderful" idea of putting FTP server on SSH port and your managenetports alias allows the traffic which you see. Fix that, or stick to WAN address, or move your pfSense SSH out of 22 and fix the alias.
-
When I posted it I really didn't expect anyone to need the full rules or aliases since the one rule should be blocking the traffic and that rule is before any pass rules other than the remotemanagement rule (put in by Chris). I didn't think the rest of the rules would matter since that traffic should never be getting past the block. It's one specific blacklisted IP I'm asking about, not all IPs accessing port 22.
FTP is in the subject because it's an FTP server. It also accepts SFTP and FTPS connections since there are a lot of file transfer clients that only support one or the other and many still use port 22 to create an SSH tunnel for the file transmission. Port 22 is the proper port for such connections and while technically an SSH connection the intent is to transfer a file in the secure tunnel rather than for command line access. But certainly if I close port 22 I will stop SSH command attempts, but I will also block some customers who need the SSL connection but have clients that do not support FTPS.
And doing so still wouldn't answer the question.. how did that specific blacklisted IP get past the block?
-
Now, pretty damn convinced that your "WAN Net" rule (already mentioned), combined with the "wonderful" idea of putting FTP server on SSH port and your managenetports alias allows the traffic which you see. Fix that, or stick to WAN address, or move your pfSense SSH out of 22 and fix the alias.
Chris put in the WAN net rule. You're right in that I don't know what it does, but Chris put it there so I left it there. In the notes he only put "Allow remote administration".
-
Fsking hell. When you write FTP, people look for port 21. Drop this ball already. You've wasted everyone's time with this nonsense, end of story.
You don't block anyone by closing port 22, you can use any port for SFTP, or SSH, or FTP. But mainly, the suggestions were
- to move the "badguys" block rule above the "remotemanagement" one - ignored
- move the FTP server where it belongs - ignored
- move the pfSense SSH port somewhere else and change the alias accordingly - ignored
- change the destination in the "remotemanagement" rule to WAN address instead of WAN net - ignored.
Come back with your findings after you've tested those suggestions. Absolutely no interest in discussing FTP vs. SFTP and Filezilla crap further.