Solved

problem in squid between L3-switch and router

Posted on 2016-09-26
4
52 Views
Last Modified: 2016-10-17
I need to config a squid server  between L3-switch and router without change configuration .  L3--->squid--->router
I installed a transparent squid  between the switch and the router in bridge mode, the switch has several vlans that speaks with a route.
All vlans can reach the router so bridging seems ok, but  i cant't see any log in squid's access.log  
my config as follows:
/usr/sbin/brctl addbr br0
/usr/sbin/brctl addif br0 eth0
/usr/sbin/brctl addif br0 eth1
/sbin/ifconfig eth0 0.0.0.0 promisc
/sbin/ifconfig eth1 0.0.0.0 promisc
/sbin/ifconfig br0 192.168.100.5 255.255.255.0 up
route add default gw 192.168.100.1 dev br0
ebtables -t broute -A BROUTING -p IPv4 --ip-protocol 6  --ip-destination-port 80 -j redirect  --redirect-target ACCEPT --log --log-level=info --log-prefix="EBTAB" --log-ip
/sbin/iptables -t nat -A PREROUTING  -i br0 -p tcp --dport 80  -j REDIRECT --to-port 3128

after i did this,no log come and no packets in iptables's nat table
sorry for my bad english
Anyone have a suggestion on how to manage the transparent proxy mode inside the vlans?
0
Comment
Question by:young liu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 41818324
I look at your config - are you suer you need a bridge or you mean bonding/ifenslave?
1
 

Author Comment

by:young liu
ID: 41819008
@gheist
 thank you for your reply.
I really need to do this. my network traffic is so confused with a lot of vlan,acl  and qos policy,use a squid box  by NAT mode  will change the static route and network structure.so  I have to use a bridge  mode. i think this will not change the network structure
do you have any good suggestions
0
 
LVL 62

Accepted Solution

by:
gheist earned 500 total points (awarded by participants)
ID: 41819193
To clear some confusion - bridge is L2, router is L3...
If you read on ebtables manual, you see that only FORWARD table will apply on the bridge.
Probably it is not a good idea to mix ebtables and iptables, either is a full framework on its own. (me never used ebtables)
NAT cannot work without IP address (see respective RFC)
0
 
LVL 62

Expert Comment

by:gheist
ID: 41846309
Hope it helped.
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Getting hacked is no longer a matter or "if you get hacked" — the 2016 cyber threat landscape is now titled "when you get hacked." When it happens — will you be proactive, or reactive?
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

691 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