Solved

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

Posted on 2014-11-13
1
311 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 61

Accepted Solution

by:
btan earned 500 total points
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

8 Experts available now in Live!

Get 1:1 Help Now