Skip to main content

Forcing proxy on IPCOP

More
17 years 8 months ago #19466 by befree
Hi,

is there a way to force clients using proxy on ipcop?


Rgds

Robin
More
17 years 8 months ago #19474 by DaLight
Replied by DaLight on topic Re: Forcing proxy on IPCOP
You need to block direct IP access for all clients using iptables. That way, clients will have to specify the IPCOP as their proxy server in order to access the internet.
More
17 years 7 months ago #19481 by befree
Replied by befree on topic Re: Forcing proxy on IPCOP

You need to block direct IP access for all clients using iptables. That way, clients will have to specify the IPCOP as their proxy server in order to access the internet.


Hi,
thanks for answering me.
Could you please explain me how to do that? I'm new on linux.

Thanks in advance


Robin
More
17 years 7 months ago #19483 by DaLight
Replied by DaLight on topic Re: Forcing proxy on IPCOP
You need to make changes to your rc.local file which is located in the following directory /etc/rc.d/

Add the following commands after the line containing "#!/bin/sh"
[code:1]
# Flush Custom Input Rules
/sbin/iptables -F CUSTOMINPUT
/sbin/iptables -F CUSTOMFORWARD

#bar access for all IPs
/sbin/iptables -A CUSTOMFORWARD -i $GREEN_DEV -s 0/0 -o $RED_DEV -j DROP
[/code:1]

The above rules simply block direct access for all clients.

After editing rc.local, you can run it by typing "/etc/rc.d/rc.local".
More
17 years 7 months ago #19497 by befree
Replied by befree on topic Re: Forcing proxy on IPCOP

You need to make changes to your rc.local file which is located in the following directory /etc/rc.d/

Add the following commands after the line containing "#!/bin/sh"
[code:1]
# Flush Custom Input Rules
/sbin/iptables -F CUSTOMINPUT
/sbin/iptables -F CUSTOMFORWARD

#bar access for all IPs
/sbin/iptables -A CUSTOMFORWARD -i $GREEN_DEV -s 0/0 -o $RED_DEV -j DROP
[/code:1]

The above rules simply block direct access for all clients.

After editing rc.local, you can run it by typing "/etc/rc.d/rc.local".



Hi,
thanks for helping me.
I followed what you suggest but when I try to run the command, this warning appear:

root@ipcop:~ # /etc/rc.d/rc.local
Warning: wierd character in interface `-s' (No aliases, :, ! or *).
Bad argument `0/0'
Try `iptables -h' or 'iptables --help' for more information

Rgds

Robin
More
17 years 7 months ago #19499 by DaLight
Replied by DaLight on topic Re: Forcing proxy on IPCOP
Replace [code:1]/sbin/iptables -A CUSTOMFORWARD -i $GREEN_DEV -s 0/0 -o $RED_DEV -j DROP[/code:1]
with:
[code:1]/sbin/iptables -A CUSTOMFORWARD -i $GREEN_DEV -o $RED_DEV -j DROP[/code:1]

Also is your RED interface a modem or a network Card?
Time to create page: 0.144 seconds