Transparent Proxy with URL Rewriting


 
Thread Tools Search this Thread
Special Forums IP Networking Transparent Proxy with URL Rewriting
# 1  
Old 03-05-2012
Transparent Proxy with URL Rewriting

All traffic on the LAN is routed through a single machine and filtered using iptables. I'd like to redirect this traffic to a transparent proxy running on the same machine that will rewrite the URL if it matches a specified regex, in which case the user will be redirected to a local server. In other words, all HTTP requests should flow through as usual unless the user attempts to navigate to, say, "xyz.com," in which case the proxy will send the user to Apache running locally with a page displaying something like "Sorry, you can't go here." I have already investigated Squid and its URL rewriting component, but it seems terribly complicated to configure and a bit overkill since I won't be using 98% of its other features. Is there a free program other than Squid I could use, or perhaps someone could provide me with some resources for writing a program myself if it isn't too complicated?

Last edited by crottyan; 03-05-2012 at 05:46 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Issue setup Transparent proxy and Gateway using Squid on CentOS 7

Hello, We are migrating our gateways from CentOS 6 to CentOS 7 and for setting up a transparent proxy using squid and Firewalld i am using below configuration. #Firewalld configurations firewall-cmd --permanent --zone=public --add-forward-port=port=80:proto=tcp:toport=3128:toaddr=LAN_IP... (4 Replies)
Discussion started by: sunnysthakur
4 Replies

2. Shell Programming and Scripting

Reading URL using Mechanize and dump all the contents of the URL to a file

Hello, Am very new to perl , please help me here !! I need help in reading a URL from command line using PERL:: Mechanize and needs all the contents from the URL to get into a file. below is the script which i have written so far , #!/usr/bin/perl use LWP::UserAgent; use... (2 Replies)
Discussion started by: scott_cog
2 Replies

3. UNIX for Dummies Questions & Answers

Awk: print all URL addresses between iframe tags without repeating an already printed URL

Here is what I have so far: find . -name "*php*" -or -name "*htm*" | xargs grep -i iframe | awk -F'"' '/<iframe*/{gsub(/.\*iframe>/,"\"");print $2}' Here is an example content of a PHP or HTM(HTML) file: <iframe src="http://ADDRESS_1/?click=5BBB08\" width=1 height=1... (18 Replies)
Discussion started by: striker4o
18 Replies

4. Shell Programming and Scripting

Need help with a shell script:Config Transparent Proxy using Shell

I want to config Transparent Proxy using Shell Script. I have more questions<exercise of me :D>: + Check that the squid is installed or not install and version is installed +Allows users to choose to run a transparent proxy or not +Perform configuration and turn on service in accordance... (0 Replies)
Discussion started by: kaka287
0 Replies

5. IP Networking

Software/tool to route an IP packet to proxy server and capture the Proxy reply as an

Hi, I am involved in a project on Debian. One of my requirement is to route an IP packet in my application to a proxy server and receive the reply from the proxy server as an IP packet. My application handles data at the IP frame level. My application creates an IP packet(with all the necessary... (0 Replies)
Discussion started by: Rajesh_BK
0 Replies

6. Shell Programming and Scripting

url calling and parameter passing to url in script

Hi all, I need to write a unix script in which need to call a url. Then need to pass parameters to that url. please help. Regards, gander_ss (1 Reply)
Discussion started by: gander_ss
1 Replies

7. UNIX for Advanced & Expert Users

url calling and parameter passing to url in script

Hi all, I need to write a unix script in which need to call a url. Then need to pass parameters to that url. please help. Regards, gander_ss (1 Reply)
Discussion started by: gander_ss
1 Replies

8. IP Networking

SQUID Transparent Proxy Server

hi guys! We are setting up Squid Server. we want the server to be transparent. But I don't know how will i be able to set the network up. is it possible to set the squid server in the same LAN with the Squid Client and still functions as a transparent server? if so, can anybody help me do it? ... (1 Reply)
Discussion started by: init6_
1 Replies

9. IP Networking

Squid Proxy URL rewriting

I have an architecture as below <> <> There is a program in the AIX server which sends SMS to the internet, by sending HTTP request to the SMS processing server. Like, http://smsserver/mysms=test However the application does not have an option to specify where the Proxy server... (1 Reply)
Discussion started by: firdousamir
1 Replies

10. Cybersecurity

IPNAT / Transparent proxy loops...

Hi! My situation: I have an OpenBSD firewall/proxy (192.168.0.1), running IPF/IPNAT w/ Squid as transparent proxy. This machine is configured to be gateway to the network. This works great, all the clients WWW-requests on the internal network are rerouted to the proxyport by this... (0 Replies)
Discussion started by: indo1144
0 Replies
Login or Register to Ask a Question
pacparser_find_proxy(3) 				     Library Functions Manual					   pacparser_find_proxy(3)

NAME
pacparser_find_proxy - Finds proxy for a given URL and Host. SYNOPSIS
#include <pacparser.h> char *pacparser_find_proxy ( const char *url, const char *host ); PARAMETERS
const char *url URL to find proxy for. const char *host Host part of the URL. DESCRIPTION
Finds proxy for a given URL and Host. This function should be called only after pacparser engine has been initialized (using pac- parser_init) and pac script has been parsed (using pacparser_parse_pac_file or pacparser_parse_pac_string). RETURNS
Proxy string on sucess and NULL on error. SEE ALSO
pacparser_version(3), pacparser_init(3), pacparser_parse_pac_file(3), pacparser_parse_pac_string(3), pacparser_parse_pac(3), pac- parser_just_find_proxy(3), pacparser_cleanup(3), pacparser_setmyip(3), pacparser_enable_microsoft_extensions(3) c2man pacparser.h 14 March 2011 pacparser_find_proxy(3)