Solved

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

Posted on 2014-11-13
1
320 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
1 Comment
 
LVL 62

Accepted Solution

by:
btan earned 500 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

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…
Do you have a windows based Checkpoint SmartCenter for centralized Checkpoint management?  Have you ever backed up the firewall policy residing on the SmartCenter?  If you have then you know the hassles of connecting to the server, doing an upgrade_…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now