IP blocked in Rules but still accessing FTP
-
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.
-
As dok has so eloquently stated over and over that is a MESS.. And your full of shit that Chris did that mess. If he did he was drunk or stoned or both..
So your telling me Chris put in all those any any rule on your wan? For employees to access what? So your not doing any sort of nat on this system?
Why would cloudflare need a any any rule into your network???
And then you have a ipv4 alllow rule but don't even show what it is you have dest and port blocked out? How do you expect anyone to help you with that mess and no explanation of your network.. That any any rule public ports sure looks like it would let anything in that wanted to get in for example to anything listening on those ports whatever they might be.
-
BTW, I definitely don't exclude the possibility that there's a bug somewhere related to the "transparent" firewall and the "WAN net" destination in particular - esp. since it's something extremely rarely used. Anyway, to confirm, you need that freaking mess reduced to absolute minimum ruleset that can reproduce the issue.
And on generic note:
- similar mess is extremely error prone and giant PITA to use. Very easy to insert inadvertent rule that totally exposes things that never should be exposed. And very easy to lock yourself out by mistake as well.
- just think about the poor guys that are gonna inherit this when you leave. There's no way they'd understand this. What are they supposed to do? Tell customers "sorry, no network services, closed for business for a couple of days, since we don't understand our own setup at all and need to redo it from scratch"?
-
I never said Chris set up all the rules. He did not. But he did set up some of them including the ones I said he did (he and Stephen both worked on this). Those are some of the rules I've been bashed for in the thread.
I haven't ignored what was said. I have made some changes based on those comments but again, the question was how can an IP get past the block rule when there is only one pass rule above the blocks and it's for two specific IPs? The rest of the rules, while they may need some work, should have never been reached due to the block rule above it. I didn't provide details on those following rules because it should have never gotten to them. The lack of information on those rules that should have never been reached seems to be the basis for much of the flaming.
I really do listen, but I admit that I hear better when the attack is not against me but rather the focus is on building a better rule set. I have made no claim to be the keeper of all knowledge. It is not required to point out that I don't know everything because I have never made such a claim and never will. I'm not an expert. I'm just a small business owner struggling to make ends meet as best I can with what I have. I am far from rich but I'm happy to be able to provide jobs for the other four people who work here. None of us are getting rich, but we have jobs.
I came here for help with something I don't have a great knowledge of, but or which I'm the best person I have to do the job. I have paid for support and received it. I think Chris and Stephen did a good job but maybe not based on the criticisms of their rules. I'm not in a position to say as both you and they are far smarter than I am. I had hoped for assistance rather than assassination. I thought that's what this forum was for.
As for the other rules, I'll explain them and listen to comments even though I don't understand why they matter if the higher placed rule should have blocked the specific IP in question.
All the pfb rules at the top were added automatically by pfBlocker. As our tiny company only deals with customers and vendors in the USA. Using pfBlocker reduces the attacks on all our servers thus lowing the chance of someone being successful. I'm aware of the debate questioning the value of the pfBlocker package but it certainly lessens the load on my mail server.
RemoteManagement is a rule put in high so that we could be assured we have access to pfSense in case we do something stupid lower that would lock us out of our own firewall. Because the firewall is in transparent mode it can not be reached from a LAN address inside our network, only by the WAN IP.
Badguys is a list of IPs I manually enter when I've noticed someone is pesky and keeps hitting my servers. If everything is working the way it should this block isn't needed. It just feels better to know I've stopped them before they reach the servers. It's an alias.
PHillOffice is a pass for a router located behind pfsense. We had some problems with valid traffic being blocked between pfsense and the router. I don't remember the specifics any more as that's been several years ago now.
ServerIPs was added by the person hired to set up pfSense the first time. It's an alias which sets a pass for traffic to our public IPs and allows only IPv4 traffic into the network since that's all we're set up for. An Alias lists the IP addresses used.
The next rule, WAN address, was put in by Chris to stop a DNS attack.
Employee is for a handicapped employee who often can only work from home. I installed an internet connection at her house just for company use. We had problems with her not being able to access some items such as phones until we added this rule. She still has to connect via a VPN (rule later) to get into the router that's located behind pfSense. There's surely a better way than a . pass here but my limited knowledge of the VOIP traffic limited me and since I already allow her access to this information it didn't seem like an additional risk to add this liberal rule which is limited to her IP address in the alias which is only gives access to a router.
Cloudflare, this rule might not be needed. Cloudflare had said we need to whitelist their IPs but I'm not sure we actually would as they're only hitting port 80 anyway. I will disable that rule now and delete it later if there are no problems. We were having issues with Cloudflare not caching our pages and this was done in an effort to see if it was an issue at the pfSense level while talking to their tech support.
The next rule is the VPN that passes the port I use for our VPN to the internal router that builds the VPN tunnel. Since we're in transparent mode this isn't done on pfSense.
The next rule is also is part of our VPN limiting traffic to a specific IP to a specific protocol in an effort to lower the chances of someone breaking into that router. I forget who set it it up, but it was one of the three experts I'd hired to help me so it was Chris, Stephen, or Glenn.
The next rule is Public ports. It's an alias of the ports used by the various servers we have behind pfsense including ports for mail servers, web servers etc. except for the ports used by the FTP server.
Finally there's the Filezilla ports for FTP, SFTP, FTPS. These ports are only used on that specific machine so it's listed as a separate rule so that only traffic on that one IP with those ports passes. No need to expose those ports on any other server IPs.
In the floating rules there's a rule that allows only SIP traffic from our providers IP to pass. A second rule allow outbound traffic to the same IP. The rules were put in by the setup wizard. All the other rules in the floating list were put in by the QoS wizard. I blocked out the ports rather than post them because it seemed safer, but I know what each of them is used for.
-
TL;DR.
I wanted you to test 4 simple things and post the result, and even explained the reasoning. So yes, again completely ignored.
The giant mess is your problem to deal with, and since apparently you are not going to move an inch further from the frickin' mess, just outta here.
All the pfb rules at the top were added automatically by pfBlocker. As our tiny company only deals with customers and vendors in the USA. Using pfBlocker reduces the attacks on all our servers thus lowing the chance of someone being successful. I'm aware of the debate questioning the value of the pfBlocker package but it certainly lessens the load on my mail server.
No. This does nothing to reduce attacks. Unless you have some service accessible to the whole world and want limit access to those, your rules are just absolutely pointless overhead and those packets would just get droppped exactly the same by the default deny rule, just without creating giant tables with hundreds of thousands of CIDR ranges. So even then, you'd be a whole LOT better off with whitelist instead of blaclist of the entire world minus a few. If you deal with US only, then whitelist US only, do not blacklist the rest of the world minus US. As an example.
Kindly read the pfBlockerNG thread. It's explained there in detail by the author of pfBlockerNG himself.
-
As dok has stated, remove that mess. And then we have a limited set of rules to deal with. If you send me the IP of this server that is getting login attempts to I can test that myself. If you log all the rules then I can give you the IP I am coming from and validate what rule is letting it in.
If you let the world into your serves port 80 (http) to the world - then there would be no reason for a specific all rule. Its possible your mess of blocks was blocking cloudflare, your using aliases that you don't even know the full listing of ips with?
As stated already it is much cleaner to just whitelist what you want to allow access into.
"It's an alias of the ports used by the various servers"
What specific ports are those - since its a any rule for dest IP, if a port is in there you could hit server 2 even if you only want someone to hit server 1 with the rule, etc. Then you have the other any any rule that is completely censored and have no idea what is the dest or ports, etc..
Clear out all those pfblocker rules, now you have smaller set of rules to work with - log them all, and then do a test from out side to this server your seeing logins with and we can see which rule is letting it in. Again if you pm me this IP I would be happy to test it for you and let you now what IP I am coming from so you can filter your logs for it and validate the problem in the rules that is letting that in.
-
First part was funny, but then things went out of control. As usually lately in this forum.
@Dok and @John, in which part of the civilized world is this the way to communicate with peers asking for help with a problem significant to them?
I have a suspicion, but in my opinion even kids in worst case countries are hardly treated worse the grown-ups in this forum.
A little more respect and a little more cultivated style of discussion would be extremely helpful.
Kind regards
chemlud
-
This is the internet - who said anything about the civilized world? ;)
And I have been nothing but straight forward and blunt.. I have offered help and advice. But can not help those that wouldn't give info and blacks out info that could be useful in figuring out his mess.