srikanth kadem
srikanth kadem

Reputation: 11

How to restrict access to single API method with IP security or some other option

I wanted to know how to restrict one WEB API method to be called from single IP by IIS or web.config. My application developed with ASP.NET WEB API. I can't make code changes at this moment(to add IPFilter as Attribute or CORS implementation )

Regards, Srikanth

Upvotes: 1

Views: 1838

Answers (1)

MJK
MJK

Reputation: 117

You can use the IIS "IP Address and Domain Restrictions" option to Allow/deny the site/API to specific IP .

In windows 10 this applet can be installed from the

Control Panel-> turn Windows Feature On or off -> Internet Information Server-> World Web Services->Security-> IP Security

In Windows server it can be enabled from the "Server Manager".

Refer below for the details.

Server manager

Domain Restriction Applet

Allow IP

Upvotes: 1

Related Questions