Re: IP FILTER and network address



Tun Eler wrote:
Hi all,
i want to have these two rules in the ipf.rules file

pass in quick on $oif proto tcp from 217.83.122.17/8 to $myip port = 22 flags S keep state
pass in quick on $oif proto tcp from 217.83.89.61/8 to $myip port = 22 flags S keep state

where $iof is my interface. Executing the config file i get the following error

ioctl(add/insert rule): File exists

Which means the rule is being loaded twice. But the networka addresses above are
different!!! If i comment any of the above two lines, ipf executes fine.
Any idea how to solve this error, and allow only these two networks above?
Thanks in advance ...

Appending your IP with /8 ends you up with two rules that essentially
look like this (AFAIK):

pass in quick on $oif proto tcp from 217.0.0.0/8 to $myip port = 22
flags S keep state

pass in quick on $oif proto tcp from 217.0.0.0/8 to $myip port = 22
flags S keep state

Perhaps you want to filter the IP's only, like:

pass in quick on $oif proto tcp from 217.83.122.17/32 to $myip port = 22
flags S keep state

pass in quick on $oif proto tcp from 217.83.89.61/32 to $myip port = 22
flags S keep state


Regards,

Steve
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Intel publishes Larrabee paper
    ... So always executing and throwing away the result if it isn't needed ... update the forwarding paths so that subsequent instructions use the old value, ... complicate the problem. ... It seems complicated at first but the flags are modelled just like any other ...
    (comp.arch)
  • IP FILTER and network address
    ... where $iof is my interface. ... Executing the config file i get the following error ... But the networka addresses above are ...
    (freebsd-questions)
  • network address in IP FILTER
    ... where $iof is my interface. ... Executing the config file i get the following error ... But the networka addresses above are ...
    (freebsd-questions)
  • network address in IP FILTER
    ... where $iof is my interface. ... Executing the config file i get the following error ... But the networka addresses above are ...
    (freebsd-questions)
  • Re: Building a kernel with SCTP support
    ... On 6/24/07, Kip Macy wrote: ... > Do I need to define additional flags in my config file? ... unless sctp_pcb.c was somehow removed from your sys/conf/files you ...
    (freebsd-current)