Hot Downloads

Welcome, Guest
Username: Password: Remember me

TOPIC: IPCop URL redirection...

IPCop URL redirection... 8 years 4 months ago #26536

  • maxlee
  • maxlee's Avatar
  • Offline
  • New Member
  • Posts: 1
  • Karma: 0
Hello all,

it seems to be very nice and informative form...

i think somebody in here might be able to help...

i am using Ipcop with an addon called TCAR, made by Ivan S. Rublev

it basically give access to specified users using their mac's and ip's and give specific amount of traffic (daily/weekly/monthly).... if limit exceeded user is blocked till the next period...

currently if a user is blocked, all his traffic will be rejected...

what i want is that instead of rejecting all the traffic, i want to redirect all his http traffic to local webserver showing a page that he has exceeded his limit...

i have gone threw the code of the addon and found where i need to add my rules for this to happen... using iptables... PREROUTING with DNAT and POSTROUTING with SNAT...

it is supposed to be the same as using transparent proxy but in this case it's just a webserver with 404 page being the same index page...

unfortunately for unknown reason (at least to me), it's not working... the user time out when trying to open any website...
here are the rules i added

iptables -t nat -I CUSTOMPREROUTING -i eth0 -s $userip -p tcp --dport 80 -j DNAT --to
iptables -t nat -I CUSTOMPOSTROUTING -o eth0 -s $userip -d -p tcp --sport 80 -j SNAT --to

the strange thing that they are added correctly to the chains but they don't work...

there is already another rules to block everything thing else from the user... which is working perfectly...

Does anybody have any idea how to archive this???

maybe it is easier to have a proxy in the middle but if it's not a must i don't want to use proxy... i used proxy before and noticed that it takes so much resources which i am not really willing to offer...

Any help on the topic is highly appreciated... Regards....
The administrator has disabled public write access.
Time to create page: 0.069 seconds


Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V


  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup