Use squid to build a simple transparent Proxy Server

Source: Internet
Author: User

Environment Introduction

VM 1:

IP

Eth0192.168.0.100/24

Eth1:

200.168.0.100/24

VM 2 (simulated Internet)

200.168.0.109/24 (run Web Server)

PC ()

IP 192.168.0.111/24 gateway 192.168.0.100

Implementation of transparent proxy

Basic implementation

1. Modify squid. conf

Http_port 192.168.0.100: 3128Transparent

2. Reload the configuration file

3. Add iptables rules to redirect internal HTTP requests to port 3128

Iptables-T Nat-A prerouting-I eth0-s 192.168.0.0/24-P TCP -- dport 80-J redirect -- To 3128

(Redirect port 80 requests from 192.168.0.0/24 to port 3128)

Enter 200.168.0.109 on the PC for testing.

Use squid to build a simple transparent Proxy Server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.