*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
What's the output of
# ipfw show
?
If your rule is after the deny all rule, it won't be matched. You need to make sure you add it before any deny rules. Oh, also you're only allow the IP datagrams TO your machine, but not FROM your machine. The responses are getting blocked going back out.
I think you need to add " setup keep-state" to the end of your rule.
Originally posted by ryancoolest 65000 0 0 allow ip from 192.168.1.254 to 192.168.1.253 setup
65535 30 3024 deny ip from any to any
I can Access my box if I use allow ip from any to any...
I wanna access my box using ssh...
ipfw allow ip from 192.168.1.254 to 192.168.1.253 22 setup
65000 103 4944 allow ip from 192.168.1.254 to 192.168.1.253 setup
65110 0 0 allow ip from 192.168.1.254 to 192.168.1.253 dst-port 22 setup
65535 271 25860 deny ip from any to any
Still can't get through ....
Any suggestion ?
Last edited by ryancoolest; 02-18-2004 at 02:53 AM.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Well for one thing you're still not using "keep-state" Using "setup" will only allow SYN packets. When you "allow ip any any" that allows it to send traffic in both directions, as I said in my first post right now you're only allowing datagrams IN, you aren't allowing the responses OUT.
I think these are the only two lines you need (starting fresh, after a flush)
ipfw add check-state
ipfw add allow ip from 192.168.1.254 to 192.168.1.253 setup keep-state
That should do it. Personally, I think ipfw is almost as bizarre as iptables and I hate it. I found PF in OpenBSD to be much easier to use. IPF in FreeBSD and NetBSD is very similar to PF (actually I think PF is a fork of IPF?).
Originally posted by chort Well for one thing you're still not using "keep-state" Using "setup" will only allow SYN packets. When you "allow ip any any" that allows it to send traffic in both directions, as I said in my first post right now you're only allowing datagrams IN, you aren't allowing the responses OUT.
I think these are the only two lines you need (starting fresh, after a flush)
That should do it. Personally, I think ipfw is almost as bizarre as iptables and I hate it. I found PF in OpenBSD to be much easier to use. IPF in FreeBSD and NetBSD is very similar to PF (actually I think PF is a fork of IPF?).
CHORT it work... Thank you very much... Your a BSD guru... Setup is for out and keep-state for in right?
If i setup my to be a web server and mail .. can i use this rules...
ipfw add allow ip from any to 192.168.83.253 80 setup keep-state
ipfw add allow ip from any to 192.168.83.253 110 setup keep-state
ipfw add allow ip from any to 192.168.83.253 25 setup keep-state
lets assume that 192.168.83.253 is a public IP.. this rules are secure right... N If this IP exist on the net Sorry i have no intention of anything...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.