Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Issue building NAT?

    Scheduled Pinned Locked Moved 2.4 Development Snapshots
    20 Posts 4 Posters 2.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      behemyth
      last edited by

      Using 2.4, latest build, and getting this error when i go into the NAT menu.

      The following input errors were detected:
      Invalid characters detected ["eth2","switch0"]. Please remove invalid characters and save again.

      Is this a possibly a bug?

      1 Reply Last reply Reply Quote 0
      • P
        phil.davis
        last edited by

        It's a "feature". On that GUI page (and some other pages) you cannot use double-quotes, "<", etc (certain special characters) in the description (or any) field.

        But that is implemented inconsistently - e.g. you can use double-quotes in a firewall rule description.

        I raised issue: https://redmine.pfsense.org/issues/7402

        And a kludge fix PR: https://github.com/pfsense/pfsense/pull/3650

        But as I say in the issue, generic input checks for special HTML chars need to be sorted out and implemented consistently across the GUI.

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

        1 Reply Last reply Reply Quote 0
        • B
          behemyth
          last edited by

          I wasn't using double quotes in my description though, it was just word word word. I tried it with _ between the words too just in case it was like some other networking code bases, and it didnt like that either.

          1 Reply Last reply Reply Quote 0
          • P
            phil.davis
            last edited by

            Can you post a screen shot of all the fields you are entering?

            There must be some unusual thing there.

            As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
            If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

            1 Reply Last reply Reply Quote 0
            • J
              JoshHuman
              last edited by

              I am also having this same issue. Screenshot is of when I first open the page to try and add.

              1 Reply Last reply Reply Quote 0
              • P
                PiBa
                last edited by

                So basically you left all field empty, press save and still get this 'error' ?

                What kind of WAN interface do use? Is there something special about it? pppoe? lagg?

                Can you modify the file /usr/local/www/firewall_nat_edit.php line 121 like this? And save the page again?

                		$input_errors[] = sprintf(gettext("For the field '%s', invalid characters have been detected '%s'. Please remove invalid characters and save again."), $key, $temp);
                
                

                Edit:
                To clarify, above change should tell what field its detecting the strange input for.. it will not fix the issue..

                What kind of hardware do you use? The sg1000 with integrated switch? which might behave differently from a regular nic.?. (i never used one..)

                1 Reply Last reply Reply Quote 0
                • B
                  behemyth
                  last edited by

                  I'm currently running the most current version virtualized in esxi.  Here is the error i get as soon as i just click on the NAT page.

                  This is with nothing in any of the boxes, i literally just clicked on NAT and this pops up at the top.

                  ![invalid characters.PNG](/public/imported_attachments/1/invalid characters.PNG)
                  ![invalid characters.PNG_thumb](/public/imported_attachments/1/invalid characters.PNG_thumb)

                  1 Reply Last reply Reply Quote 0
                  • P
                    phil.davis
                    last edited by

                    I am not certain exactly what you mean by "click on the NAT page.

                    When you select Firewall->NAT from the menus, do you immediately get the message/problem?
                    (i.e. you cannot even display the (possibly empty) table of NAT port forwards)

                    As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                    If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                    1 Reply Last reply Reply Quote 0
                    • B
                      behemyth
                      last edited by

                      That would be correct. When i click on Firewall > NAT, that error pops up at the top, and no matter how many fields I fill in, it wont let me finish the NAT and that error is the only reason why.

                      1 Reply Last reply Reply Quote 0
                      • P
                        PiBa
                        last edited by

                        when you click on firewall>nat  there are no fields to fill in.
                        i think you press an 'add' and then on 'save' as well?
                        When there is doubt about what your clicking please specify every click..

                        Anyhow if my assumption is right, please edit the line like i wrote a few posts above and try again? Then tell what the error is then.?.

                        1 Reply Last reply Reply Quote 0
                        • J
                          JoshHuman
                          last edited by

                          I get this immediately after clicking add, before I type anything in.

                          I had the same issue after making the requested change to line 121.

                          I am running this in Hyper-V on a 2600k

                          I only just noticed my issue is slightly different from OP…

                          1 Reply Last reply Reply Quote 0
                          • P
                            phil.davis
                            last edited by

                            What does the error message say now, that is what we need to know - it should contain "For the field…", which will be very interesting to know.

                            As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                            If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                            1 Reply Last reply Reply Quote 0
                            • J
                              JoshHuman
                              last edited by

                              For the field 'wireless_list_F8:32:E4:4E:54:78_temp', invalid characters have been detected 'd8:97:60:02:dd:b6Yes<44:61:32:E7:14:8C>Yesac:37:81:43:4e:7bYesc0:33:01:5e:22:6dYes<08:62:66:09:CC:D9>Yesc4:d9:87:7a:34:7eYes<08:62:66:16:B8:B1>Yes'. Please remove invalid characters and save again.</c4:d9:87:7a:34:7e></c0:33:5e:22:6d:01></ac:37:43:4e:7b:81></d8:97:60:02:dd:b6>

                              1 Reply Last reply Reply Quote 0
                              • P
                                PiBa
                                last edited by

                                As far as i can tell that field does not exist in the pfSense NAT port forwarding page.

                                What kind of browser are you using? Any plugins installed? Can you try a different one?

                                Also it would be interesting if you would look into the 'source' of the html as your browser uses it where this field wireless_list field is present. Perhaps you can save the complete webpage to a file in the browser and attach it on the forum? (or pm it to me perhaps?)

                                1 Reply Last reply Reply Quote 0
                                • J
                                  JoshHuman
                                  last edited by

                                  I've added the source, wireless_list only shows up in the error…

                                  I am using chrome. I checked it in edge and it is working as expected there.

                                  [port forward source.txt](/public/imported_attachments/1/port forward source.txt)

                                  1 Reply Last reply Reply Quote 0
                                  • P
                                    PiBa
                                    last edited by

                                    Works ok in Chrome for me.. Can you open the developer tools F12 then use  ctrl+shift+f  to search in all files and search for 'wireless' ? Wondering if perhaps it will show up in some injected javascript.?.

                                    Another thing to check, run chrome in incognito mode and try if that fixes anything?
                                    Also still interested in any installed browser-plugins you might have, can you try disabling them?

                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      JoshHuman
                                      last edited by

                                      No results when searching in developer tools. I disabled all extensions, still the same issue. Running Version 58.0.3029.19 beta (64-bit). Happens on mobile, android, chrome as well. Works fine in incognito mode.

                                      works fine on the stable branch of chrome Version 57.0.2987.110 (64-bit)

                                      1 Reply Last reply Reply Quote 0
                                      • P
                                        PiBa
                                        last edited by

                                        Sorry, i'm out of ideas without some 'hands on debugging' checking of things. That extra piece of posted data must be coming from somewhere…
                                        Chrome: "Versie 59.0.3046.0 (Officiële build) canary (64-bits)" works for me..

                                        1 Reply Last reply Reply Quote 0
                                        • B
                                          behemyth
                                          last edited by

                                          Yeah it seems to work fine in Safari too, and Chrome in cognito mode. The only add-in i am running is ad-block, but i paused it when i tried this and still got the same error. Are you guys all using the 64 bit version? I wonder if the problem happens on the 32 bit one.

                                          1 Reply Last reply Reply Quote 0
                                          • B
                                            behemyth
                                            last edited by

                                            I just tested it in a vm that i installed 32 bit chrome on and i do not get the error.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.