Firewall problem … or maybe it's just me ;)
I've been using pfsense for some time, but i still have an issue i haven't realy figured yet, and since there is still no documentation on this, i must ask.
I use pfsense to allow internet acces to 3 different subnets, all public ip's. I enabled outbound nat for these ip's, and it all works, the routed ip's are visible to the internet, etc. I can't seem to make any firewall rule work tough, and there are no rules created in the firewall section. I figure it's an issue with my enabling outbound nat for these ip's but i can't stop anything. I would like to be able to block some ip's in these subnets and block some ports. Where am i going wrong about this?
Any help would be appreciated.
Please bare in mind, i worked a very long time with windows servers, probably my mind is still locked in their patterns - that means i'm stupip enough, and someone would have to be patient with me.
I've seen on the forum that it's not yet possible to implement a blacklist for ip's… any time frame for that?
Thank you for your patience.
Thank you, after the upgrade to the latest stable release, it works now.
Hm… and yet...
If i only enable outbound nat, without any rules, like in the faq, the opt lan's work, but not the main lan.
If i enable routes in the outbound nat, the firewall rules do not apply.
the blacklist would come in handy in this situation, but i still can't block ports.
Anyone, take pity in my suffering, and please try to explain a poor retard what to do. ;)
hoba last edited by
Can you give us some more insight in your install and what exactly you are trying to do?
Some information on your subnets and IPs at the interfaces would be helpful. Also what you want to block or pass from where to where. It's easier to explain with your real life setup than have a guess at a config that might be understood wrong by the person that tries to explain it.
Concerning the blacklist IP feature that might be a feature for the 1.1 alias system but as 1.0 is not out yet we can't comment on the timeframe. I would suggest using an IP or network Alias and add all the blacklisted IPs there. Depending on what you are trying to do blocking all and allowing just some whitelist IP aliases might be less work to configure but that's again a guess. Details please… ;)
ok, the situation is like this:
I have an ip given by my isp aa.aaa.aa.aaa/29
this is set on my wan. It connects on a gateway aa.aaa.aa.aax/29
and 2 dns
i bought 3 p[ublic ip classes, bb.bbb.bb.bbb/27, cc.ccc.cc.ccc/27 and dd.ddd.dd.ddd/26 and i use this machine to route them
i have 3 nics (except wan), and i set them like this:
that is the firs available ip of the class on every nic.
This configuration worked like this on various machines, including an older version of pfsense
So i must have public ip's out on the internet from my lan's, so i enable outbound nat. Bare in mind that in an older version of pfsense, same thing worked for all ip's. For some reason, now it just does nat. I got it working with a rule in the outbound nat, like wan - source any - destination any - port any
same thinf did on every nic in firewall. The thing is that when i try to add blocking rules (in the correct order - blocking rules in front of the allowing rules) they don't work. I have a few ip's that i must block from time to time, and also some ports - 137 - 139, 445, etc I do not use dhcp, and my stations use the isp'a dns
I figure there are too many allowing all rules, but where do i block now?
here is how my config file looks - i edited the ip's for obvious reasons
- <interfaces>- <lan><if>fxp1</if>
- <dhcpd>- <lan>- <range><from>192.168.1.100</from>
- <diag>- <ipv6nat><ipaddr></ipaddr></ipv6nat></diag>
<bridge><syslog>- <nat><ipsecpassthru>- <advancedoutbound><enable>- <rule>- <source>
<sourceport><descr>Auto created rule for LAN</descr>
- <filter>- <rule><type>pass</type>
<descr>Default LAN -> any</descr></any></os></statetimeout></max-src-states></max-src-nodes></rule></filter>
<aliases><proxyarp><wol>- <installedpackages>- <package><name>ntop</name>
<descr>ntop is a network probe that shows network usage in a way similar to what top does for processes. In interactive mode, it displays the network status on the user's terminal. In Web mode it acts as a Web server, creating an HTML dump of the network status. It sports a NetFlow/sFlow emitter/collector, an HTTP-based client interface for creating ntop-centric monitoring applications, and RRD for persistently storing traffic statistics.</descr>
<tooltiptext>Set ntop settings such as password and port.</tooltiptext>
- <revision><description>Installed ntop package.</description>
Thank you for your help and patience.
jeroen234 last edited by
you have to make blocking rules for every interface
action block interface lan protocol tcp source any source port range any any desenation any desenation port range from other 137 to other 139
action block interface opt1 protocol tcp source any source port range any any desenation any desenation port range from other 137 to other 139
action block interface opt2 protocol tcp source any source port range any any desenation any desenation port range from other 137 to other 139
for blocking 137 till 139 on lan,opt1 and opt2
hoba last edited by
Just keep in mind: You always have to block Incoming traffic at an Interface, so if you want to block traffic from LAN to Opt1 your rule has to be applied to the LAN Interface.
In your scenario I would use some Aliases to get your blacklist function and to keep number of rules low to have a better overview:
at all Interfaces:
block proto any source-ip "blacklistip" source-port any destination-ip any destination-port any
block proto tcp/udp source-ip any sourceport any destination-ip any destination-port "blacklistports"
pass proto any source-ip <interface>subnet sourceport any destination-ip any destination-port any
Needed Aliases for this:
blacklistip - hosts alias with all blocked IPs
blacklistports - ports alias with blocked ports
This way you can simply add your IPs to the blackistip alias or ports to the blacklistports (at least if you want to handle them all the same way). For special needs you can combine ports and hosts aliases or invent more aliases. Try to use the alias system as much as you can. It can simplify things a lot.</interface>