?
Solved

How to send all network traffic generated by tomcat/app_server to a proxy_host:port

Posted on 2014-11-13
1
Medium Priority
?
348 Views
Last Modified: 2014-11-28
I am using a appserver/tomcat in the AWS (amazon web service) which is in private subnet. There is code inside appserver which talk with external authentication service. Now I have a proxy/NAT server (proxy:port) which has direct connectivity to external services.

Using iptables, How can I send all the network traffic request generated by tomcat/appserver via proxy:port so that tomcat/appserver can reach external authentication services?

Thanks!
0
Comment
Question by:beer9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 64

Accepted Solution

by:
btan earned 1500 total points
ID: 40441644
you may want to check out the proxy setting for AWS iptables in /etc/sysconfig/iptables - note from the sharing that the below applies to all packets arriving from outside to any network interface. If you are running any applications on the same instance that need to talk to Tomcat on the HTTP port, you need to add another rule.
e.g. sudo /sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

and it also stated to include the proxyPort attribute in your HTTP connector config in server.xml (in this case): <Connector port="8080" proxyPort="80" .../>
Just to share other using similar for more examples
0

Featured Post

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wikipedia defines 'Script Kiddies' in this informal way: "In hacker culture, a script kiddie, occasionally script bunny, skiddie, script kitty, script-running juvenile (SRJ), or similar, is a derogatory term used to describe those who use scripts or…
If you are like regular user of computer nowadays, a good bet that your home computer is on right now, all exposed to world of Internet to be exploited by somebody you do not know and you never will. Internet security issues has been getting worse d…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question