#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2005
    Posts
    54
    Rep Power
    9

    Exclamation Syntax error "noroute" on PF OpenBSD


    Hi all,

    I need to understand why in my pf.conf file get a syntax error on the following line when I run the pfctl -f /etc/pf.conf.

    NoRoute = "{ 127.0.0.1/8, 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8, 255.255.255.255/32 }"

    can someone help me ?

    thanxx in advance
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    296
    Rep Power
    0
    Don't know why you get this error, but you can always do this:

    block in quick on $ext_if from 10.0.0.0/8 to any
    block in quick on $ext_if from 127.0.0.0/8 to any
    block in quick on $ext_if from 172.16.0.0/12 to any
    block in quick on $ext_if from 192.168.0.0/16 to any

    Just change $ext_if to your internet interface, this work for me.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2005
    Posts
    54
    Rep Power
    9
    it does not help.... I still have the error..

    this are the error that I get:

    /etc/pf.conf:48: syntax error
    /etc/pf.conf:113: macro 'NoRoute' not defined
    /etc/pf.conf:113: syntax error
    /etc/pf.conf:114: macro 'NoRoute' not defined
    /etc/pf.conf:116: macro 'OutServicesUDP' not defined
    /etc/pf.conf:116: syntax error
    /etc/pf.conf:117: macro 'OutServicesTCP' not defined
    pfctl: Syntax error in config file: pf rules not loaded

    I don't understand why I have a non define rule error ... and syntax error .. Did I spell the command in a bad way?

    Thank you a lot in advance for your help ..
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    296
    Rep Power
    0
    Like I said, I don't use "NoRoute", just the commands that I write in my last post.

    You can change this:

    NoRoute = "{ 127.0.0.1/8, 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8, 255.255.255.255/32 }"

    to this:

    block in quick on $ext_if from 10.0.0.0/8 to any
    block in quick on $ext_if from 127.0.0.0/8 to any
    block in quick on $ext_if from 172.16.0.0/12 to any
    block in quick on $ext_if from 192.168.0.0/16 to any
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2005
    Posts
    54
    Rep Power
    9
    Hi Murphy,
    Like I said in my last post too, what you gave me does not help. I have changed it but I still get the same error msg.
    I have found THE SOLUTION !! It is lot more simple than any thing but OpenBSD read the lines and translate the code on the going. 3 lines upper on my PF.CONF file i have forgot to close the " signe and that caused the error ... 3 lines forward but still... we could be here discussing long time !!

    Well thank you for your concern on this one
    Cheers

IMN logo majestic logo threadwatch logo seochat tools logo