Tested - CentOS 5- Custom iptables 1.4.1
1)iptables -t mangle -I OUTPUT -m owner --uid-owner squid -j MARK --set-mark 0x1
2)iptables-save > /etc/sysconfig/iptables
3)edit /etc/iproute2/rt_tables and add a line:
101 squid
4)/etc/sysconfig/network-scripts/rule-eth0:
fwmark 0x1 table 101 pref 1000
/etc/sysconfig/network-scripts/route-eth0:
default via 10.0.0.2 dev eth0 table 101
*You can do this manually:
/sbin/ip rule add fwmark 0x1 table 101 pref 101
/sbin/ip route add default via 10.0.0.2 dev eth0 table 101
5)Restart network service
service network restart
6)Check that the ip rules
ip route list table 101
ip rule show
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
-
▼
2009
(26)
-
▼
May
(10)
- Weird Samba Error when upgrading SAMBA
- Samba - Act as a domain controller
- SQUID - Traffic Management via Delay Pools
- SQUID - Allowing internet traffic to go through a ...
- SQUID - Allow Access via Mac Access
- BASH Shorten Scripts
- Creating a Ethernet/Wireless Bridge
- SQUID - Save money and bandwidth caching streaming...
- Squid Tips
- First Post
-
▼
May
(10)
No comments:
Post a Comment