Jump to content

HTTP header X-Forwarded-For


Recommended Posts

Hello, I hope you can help me, I'm configuring the HTTP header X-Forwarded-For in the HTTP parameters, but it gives me the following error message when I apply it (Invlaid argument) and I do not know what mail can be, I also tried with command line and it gives the same error: I have configured other VPX's and they have not given me any problems.

 

CLI:   set ns param -maxConn 0 -maxReq 0 -cip ENABLED X-Forwarded-For -cookieversion 1 -secureCookie ENABLED -pmtuMin 576 -pmtuTimeout 10 -grantQuotaMaxClient 10 -exclusiveQuotaMaxClient 80 -grantQuotaSpillOver 10 -exclusiveQuotaSpillOver 80 -useproxyport ENABLED -tcpCIP DISABLED -secureicaPorts 443
ERROR: Invalid argument

 

Thank you very much for the help.

 

Best regards.

Link to comment
Share on other sites

8 minutes ago, Alfredo Lopez Frias said:

Hello, I hope you can help me, I'm configuring the HTTP header X-Forwarded-For in the HTTP parameters, but it gives me the following error message when I apply it (Invlaid argument) and I do not know what mail can be, I also tried with command line and it gives the same error: I have configured other VPX's and they have not given me any problems.

 

CLI:   set ns param -maxConn 0 -maxReq 0 -cip ENABLED X-Forwarded-For -cookieversion 1 -secureCookie ENABLED -pmtuMin 576 -pmtuTimeout 10 -grantQuotaMaxClient 10 -exclusiveQuotaMaxClient 80 -grantQuotaSpillOver 10 -exclusiveQuotaSpillOver 80 -useproxyport ENABLED -tcpCIP DISABLED -secureicaPorts 443
ERROR: Invalid argument

 

Thank you very much for the help.

 

Best regards.

CAn you try only this command?:

 

set ns param -cip EnABLED X-Forwarded-For

 

Also you can add this header via a rewrite policy per vip, or on the service level (-cip EnABLED X-Forwarded-For)

Link to comment
Share on other sites

24 minutes ago, Alfredo Lopez Frias said:

Thanks Mihai for you help, but i'ave the same error, please see bellow.

 

CLI:  

set ns param -cip EnABLED X-Forwarded-For
ERROR: Invalid argument

 

Regards.

If you only tried CLI, try gui though it looked like you tried GUI and CLI...which may mean bug.

Which version of firmware are you on?

And do you have superuser rights or delegated admin rights?  And for the heck of it, which browser are you using...maybe a field isn't rendering in this case?

 

Finally, were there any other fields in the GUI that looked required, but maybe were set to 0 when they needed to be blank?  So its actually a different parameter tripping up.

 

Link to comment
Share on other sites

Thank you very much Rhonda for your help, I have tried to configure it in two ways, CLI and GUI and in both cases the same error, the version is NS12.0.60.9, I have other instances created with the same configuration and I have not had any problems at the moment to configure X-Forwarded-For, I did it with the nsroot user and with my user that I have as admin, my browser is Chrome and I have used it to configure the other instances without problems.

 

Please see the attached file.

 

Thanks in advance.

 

Regards

Invalid argument.PNG

Link to comment
Share on other sites

If you are getting invalid parameter and the GUI is highlighting the Server Header field, then it is a gui bug, the server header is being set while the "enable server header" is off. This must be a version specific bug. Try enabling the "insert server header" field, clearing the box, and then deselecting it to turn it back off.

 

Otherwise if its still failing, you can still set the value per service/service group or use a rewrite policy to do the client ip header insertion as a workaround. Check the release notes and see if its noted as a known issue in this release or the one after it and maybe its resolved. 

Link to comment
Share on other sites

  • 4 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...