Ip And Port Divertion Through Iptables


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Ip And Port Divertion Through Iptables
# 1  
Old 05-11-2011
Ip And Port Divertion Through Iptables

Hi To All,
I want to Route my web application to Mysql Database through a proxy server.so for this which approach should i use
1)iptables
2)squid

if Iptables how can i make this worked .this is the ip network i'm having

Code:
web application---------Proxy server-----------------Mysql Database
10.0.0.2                       10.0.0.4                                  10.0.0.6

i should make it work that web application(10.0.0.2) should route to proxy server(10.0.0.4) for database objects but should get the query objects from the Database(10.0.0.6)

Last edited by pludi; 05-11-2011 at 11:50 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

iptables port forwarding

Hello All, I would like to ask you very kindly with /etc/sysconfig/iptables file I have to setup port forwarding on RHEL6 router. Users from public network must be able to ssh to servers in private network behind RHEL6 router. Problem is that servers in private network must be isolated. My... (2 Replies)
Discussion started by: oidipus
2 Replies

2. Red Hat

iptables help for port 80

Hi I enable the IPtables but port 80 was not working. Below is my active configuration (10 Replies)
Discussion started by: ranjancom2000
10 Replies

3. UNIX for Dummies Questions & Answers

iptables to block port 25 only to a certain range

I want to limit all *outbound* traffic on eth0 (or all *.*) on port 25 to a specific (allowed) range... I.E. 192.168.1.5 (local ip) tries to connect to 1.2.3.4:25 (outside real world ip) It can proceed because 1.2.3.0/24 is the allowed range Now, 192.168.1.5 (local ip) tries to connect to... (1 Reply)
Discussion started by: holyearth
1 Replies

4. Red Hat

Open port with iptables

Hi, What iptables command do I need to run in order to open up the following port for incomming traffic on the following server: # telnet 127.0.0.1 1521 Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused telnet: Unable to connect to remote host: Connection... (3 Replies)
Discussion started by: Duffs22
3 Replies

5. Red Hat

iptables & port 53 (DNS)

Hi, I have a newly built RHEL5 OS that is unable to talk to the DNS server. I am unable to telnet resolv.conf entry over port 53 but apparently this port has been opened. # telnet 209.212.96.1 53 and..... # dig www.google.com ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>>... (9 Replies)
Discussion started by: Duffs22
9 Replies

6. Debian

Iptables Nat forward port 29070

Hello, the Nat and the forward worked on my debian server up to the reboot of machines. The following rules*: /sbin/iptables -t nat -A PREROUTING -p tcp -i eth2 -d xxx.xxx.xxx.xxx --dport 29070 -j DNAT --to-destination 10.0.1.7:29070 /sbin/iptables -A FORWARD -p tcp -i eth2 -o eth0 -d... (0 Replies)
Discussion started by: titoms
0 Replies

7. UNIX for Advanced & Expert Users

copy packets from one port to another by iptables

I would like to copy data flow (not redirect!!!) from 1567 port to another 1194 port on same computer. The 1567 Port already binded by Scream program (it is bisy). Is it possible to do it by iptables or for it nesessary another programs? Can you help me in the decision of this question? (1 Reply)
Discussion started by: yanat
1 Replies

8. Fedora

Using iptables to allow only certain IPs for a Port

Hi.. Anyone can help me..I have setup my linux fedora server and i want to restrict access to my server.Basically i control using iptables.I'm not sure how to write an iptables rules to control drop all connection to port 8080 and allow only certain ip can access the instance on port 8080 example... (0 Replies)
Discussion started by: netxus
0 Replies

9. Linux

Kernel programming: packet divertion

Hi All, Not sure if this is the right place to ask, so please tell me where is appropriate... Anyway, here is the problem. I'm a bit new to kernel programming, so nothing works :confused: . I need to intercept cetrtain ethernet packets from Host1("eth0") to Host2("eth1") and send them to... (1 Reply)
Discussion started by: sl_king
1 Replies

10. UNIX for Dummies Questions & Answers

iptables: forwarding a port

I've been googling for a while now, trying to forward port 3000 to port 80.... In the past I used to DLink router to forward port 3000 to 80. I recently finished (well, is it ever done anyhow?) setting up my linux box and got it acting as a router. I want to continue to run Apache on port 80... (1 Reply)
Discussion started by: meeps
1 Replies
Login or Register to Ask a Question
squidclient(1)						      General Commands Manual						    squidclient(1)

NAME
squidclient - A simple HTTP web client tool SYNOPSIS
squidclient [ -aknNrsv ] [ -A string ] [ -g count ] [ -h remote host ] [ -H ' string ' ] [ -i IMS ] [ -I ping interval ] [ -j ' Host header ' ] [ -l local host ] [ -m method ] [ -p port ] [ -P file ] [ -t count ] [ -T timeout ] [ -u user ] [ -U user ] [ -V version ] [ -w pass- word ] [ -W password ] url DESCRIPTION
squidclient is a tool providing a command line interface for retrieving URLs. Designed for testing any HTTP 0.9, 1.0, or 1.1 web server or proxy. This tool can be combined with scripts to perform any basic HTTP operation. Some additional features for access to the squid proxy object cache and management information are provided. OPTIONS
-a Do NOT include Accept: header. -A 'string' Send string as User-Agent: header. To omit the header completely set string to empty (''). -g count Ping mode, perform count iterations (0 to loop until interrupted). -h host Retrieve URL from cache on hostname. Default is localhost -H 'string' Extra headers to send. Use '0 for new lines. -i time If-Modified-Since time (in Epoch seconds). -I interval Ping interval in seconds (default 1 second). -j hosthdr Host header content -k Keep the connection active. Default is to do only one request then close. -l host Specify a local IP address to bind to. Default is none. -m method Request method, default is GET. Squid also supports a non-standard method called PURGE. You can use that to purge a specific URL from the cache. You need to have purge access setup in squid.conf similar to manager access. Here is an example: acl purge method PURGE http_access deny purge !localhost -n Proxy Negotiate(Kerberos) authentication. Use kinit username@DOMAIN first to get initial TGS. -N WWW Negotiate(Kerberos) authentication. Use kinit username@DOMAIN first to get initial TGS. -p port Port number of cache. Default is 3128. -P file Request body. Using the named file as data. -r Force cache to reload URL. -s Silent. Do not print data to stdout. -t count Trace count HTTP relay or proxy hops -T timeout Timeout value (seconds) for read/write operations. -u user Proxy authentication username -U user WWW authentication username -v Verbose. Print outgoing message to stderr. -V version HTTP Version. Use '-' for HTTP/0.9 omitted case -w password Proxy authentication password -W password WWW authentication password AUTHOR
Derived from Harvest. Further developed by by numerous individuals from the internet community. Development is led by Duane Wessels of the National Laboratory for Applied Network Research and funded by the National Science Foundation. COPYRIGHT
Distributed under the GNU General Public License (GNU GPL) version 2 or later (GPLv2+). QUESTIONS
Questions on the usage of this program can be sent to the Squid Users mailing list <squid-users@squid-cache.org> REPORTING BUGS
See http://wiki.squid-cache.org/SquidFaq/BugReporting for details of what you need to include with your bug report. Report bugs or bug fixes using http://bugs.squid-cache.org/ Report serious security bugs to Squid Bugs <squid-bugs@squid-cache.org> Report ideas for new improvements to the Squid Developers mailing list <squid-dev@squid-cache.org> SEE ALSO
squid(8), cachemgr.cgi(8) squidclient(1)