LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-21-2019, 10:59 AM   #1
johnw35358
LQ Newbie
 
Registered: May 2019
Posts: 1

Rep: Reputation: Disabled
New to Squid and having issues with url_rewrite_program


Hello,

I am taking an online pen testing class and the current assignment is to implement a program (googleSearch.pl) on another machine on my network. I am running Kali on a dual boot machine with Mint. In Kali I have installed Squid 4.6 and Apache2.

In squid.conf I received issues when changing http_port 3128 to 'transparent'. I left it as is, and added a port 3129 as transparent. Squid starts fine now.

I added 'url_rewrite_program /root/Files/googleSearch.pl' to the EOF of squid.conf. After starting squid and apache2 (not sure yet what apache2 does) and arpspoofing target pc (port 80 to port 3129) the target machine is definiteley arpspoofed (it is a Windows 10 machine and arp -a shows duplicate physical addresses, so I think that part is fine).

The .pl is supposed to append text to the end of search queries (i.e.'espn' becomes 'espn in my pants'). It does not. I am wondering if I have done something wrong or if the .pl is not working correctly. My programming experience is primarily in Java, but Perl isn't that complicated and the code makes sense to me.

The changes I made to squid.conf are:

uncommented 'acl localnet src 192.168.1.1/16'
uncommented 'http_access allow localnet'
added 'http_port 3129 transparent'
left 'http_port 3128' unedited and UNcommented
added 'url_rewrite_program /root/Files/googleSearch.pl' to EOF

Changes to nat:

iptables -t nat -A PREROUTING -i wlan1 -p tcp --dport 80 -j REDIRECT --to-port 3129
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -I INPUT -p tcp --dport 3129 -j ACCEPT

I am doing this wirelessly but on my own network to which the target machine is also connected.

Any help would certainly be appreciated.

Thank you so much. I just joined this community as I have heard it is a great place to go for linux help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Just installed a new hard drive and need to mount but having issues CurtisCoburn Linux - Hardware 1 01-21-2013 08:40 PM
Having problems with Dual Booting Ubuntu and Vista, Ubuntu having major issues. Chimmichango Linux - Newbie 2 08-03-2009 02:54 AM
Dell m1210 Linux issues (having issues getting network working under Ubuntu) thebert Linux - Newbie 4 03-14-2008 03:47 PM
New to Linux and already having Issues TLG2 Linux - Hardware 5 09-03-2003 12:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration