Steps to fresh jenkins installtion on on Apache Tomcat Server : http://www.automatethebox.com/2016/06/installing-jenkins-on-apache-tomcat.html
If Jenkins is installed on Tomcat Server
- Add any of the below entry in the conf\context.xml file :
- <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127.0.0.1"/><!--Allow from Ip Address-->
- <Valve className="org.apache.catalina.valves.RemoteAddrValve" deny="127.0.0.1"/><!--Deny from Ip Address-->
- <Valve className="org.apache.catalina.valves.RemoteHostValve" allow="yahoo.com"/><!--Allow from a Domain-->
- <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1|202.43.25.244"/><!--Allow from multipl ip's-->
- Restart the Tomcat Server
Now, when you try to access Jenkins url, you should get 403 error
If Jenkins is installed on Apache Server
- Add all of the below entries in the conf\.htaccess file to allow access from ip '45.67.87.67' and '10.66.62.0/24' LAN only
- Order Deny,Allow
- Deny from all
- Allow from 45.67.87.67
- Allow from 10.66.62.0/24
- Restart the Apache Server
Now, when you try to access Jenkins url, you should get 403 error
No comments:
Post a Comment