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

    Join Date
    Sep 2013
    Posts
    3
    Rep Power
    0

    Accessing a form on a LAN through a webserver on a DMZ from the same LAN?


    I'm using a application called Jira.. its a dev bug/release tracking system.

    the Jira instance is internal LAN and must stay that way for security reasons. So the only access to it currently is via VPN from outside.

    However we want to be able to allow people to submit JIRA request without having to VPN in.

    Issue collector is a built in Jira form creator that does exactly that.. so it seems like a good option.

    I have a websever set up on the same network in the LAN. The webserver is acessible via the WAN. So I have a basic html page with the issue collector java script code pasted inside.

    However the issue collector does not load when that page is acessed externally. Internally it does obviously. But extrnally just the basic html page loads. So obviously my browser is trying to pull the form via the internal IP of JIRA directly when I would like the webserver I'm on to display it as IT has access to the form internally but outside not so much.

    Anyone have any idea how to make this work?

    The Java script is specifically looking for the internal hostname to Jira which obviously outside people wouldnt have access to, however the webserver does and people have access to the webserver so there has to be a way to display the issue collector through the separate webserver, no?

    Any thoughts?

    Thanks.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    May 2004
    Location
    surfing the interwebz
    Posts
    2,408
    Rep Power
    2004
    Sorry I don't know much about programming or code, but if it's an internal name resolution issue, I'm thinking maybe you have to configure a NAT rule; or did I misunderstand you?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    829
    Rep Power
    275
    If you are using Apache on the "outward" server, you may be able to make this work using ProxyPass and possibly ProxyPassReverse in the config of the "outward" server pointing to the LAN-only server, so, the LAN-only server/app still thinks its being accessed from the LAN.
  6. #4
  7. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,905
    Rep Power
    3969
    Depending on what you DNS situation is like, it may be possible to have the same hostname resolve differently internally vs externally. For internal users have it resolve to the proper internal IP. For external users, have it resolve to your webserver's public IP.

    Then you could just have your webserver configured as a proxy which allows external users to access that part of Jira.

    Other options may be to use a proxy with some kind of filter to translate instances of the hostname in the response into a different host name. Or write your own form in something like PHP and when submitted post the data to Jira's form using cURL

    I've never used Jira so I don't know anything regarding how it works. The two proxy methods are fairly generic. The PHP+cURL would require a custom program to forward the Jira. Going the PHP route would given you an opportunity to filter the submissions prior to submitting them to Jira (eg for spam, to limit input options, set defaults, etc).
    Recycle your old CD's, don't just trash them



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    3
    Rep Power
    0
    Thanks for the replies so far!

    I think the php curl option is the best, im just not good with coding so I don't know if I could make it work since it needs to be perfect to function. Sample scripts would be nice.


    I didn't think the solution through initially I didnt realize the java would be executed locally on the users browser and not locally on the server side.

    Basically I need the java to execute on the server side..... (where it will find the other box that jira is on...10.x.x.x since it has access to that internal ip but the world doesnt)

    I'm reading up on curl now and that route.. seems daunting to me though I'm sure its simple to some. I'll post results if I figure it out to help others.... any other tips in the meantime is appreciated.


    The basic html page is here.. as you can see it clearly loads the jira JS from the local ip (since its not run server side anyone accessing outside our LAN sees just a nice background and nothing else)



    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>Sales Support Request</title>
    <style type="text/css">
    .auto-style1 {
            text-align: center;
    }
    .auto-style2 {
            vertical-align: middle;
            margin-top: 30px;
            margin-bottom: 30px;
    }
    </style>
    </head>
    
    <body>
    
    <p class="auto-style1">
    <img alt="Submit A Request" class="auto-style2" height="744" src="../mainpic02.png" width="1600" />&nbsp;</p>
    <p>&nbsp;</p>
    
    <script type="text/javascript" src="http://10.245.15.64:8080/s/en_CAd9b5gv-418945332/845/3/1.2.9/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?collectorId=30a103db"></script>
    
    
    
    </head>
    
    <body>
    
    
    
    </body>
    
    </html>

    I don't know how to view the source for the JIRA form itself...
    so I'm guessing in order to collect the fields of information on the php page and pass them along to the JIRA form I'd need to know how jira labels the fields.. so .. argh..
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    3
    Rep Power
    0
    example of what the collector inside the JS looks like....

    answers.atlassian.com/upfiles/forms_screen01.png

IMN logo majestic logo threadwatch logo seochat tools logo