Posted: Sun Feb 19, 2012 8:38 pm Post subject: Is It possible to use sms & gateway..
Hello
Is it possible to use sms as a gateway for home use.
gatway between wan & lan
I want to limite the connection usage for some pc..
if it is possible how can i do it
thank you.
Hello,
you can do it, but there is not an easy way of doing it.
If that's only what you want, you can use coyote linux or zeroshell, which they have web front end.
If you need other services as well, you can use SMS.
I'm not familiar with tc but, here is an example /etc/rc.d/rc.firewall
assuming your wan is plugged in eth1, and you are having a 24mbit sDSL line
first class will use full line capability
second class will use 8 to 24Mbps depending on first's class traffic
third class will limited to 800Kbps
In example IP 192.168.1.14 is limited to 800Kbps
Code:
#!/bin/sh
EXTERNAL=eth1
INTERNAL=eth0
IP_1=192.168.1.14
iptables -t nat -F
iptables -t nat -A POSTROUTING -o $INTERNAL -j MASQUERADE
iptables -A FORWARD -i $EXTERNAL -j ACCEPT
tc qdisc del dev $EXTERNAL root
tc qdisc add dev $EXTERNAL root handle 1:0 htb default 2
tc class add dev $EXTERNAL parent 1:0 classid 1:1 htb rate 24mbit ceil 24mbit
tc class add dev $EXTERNAL parent 1:1 classid 1:2 htb rate 8mbit ceil 24mbit
tc class add dev $EXTERNAL parent 1:1 classid 1:3 htb rate 800kbit ceil 800kbit
tc qdisc add dev $EXTERNAL parent 1:2 sfq
tc qdisc add dev $EXTERNAL parent 1:3 sfq
tc filter add dev $EXTERNAL parent 1:0 protocol ip u32 match ip src $IP_1 flowid 1:3
tc filter add dev $EXTERNAL parent 1:0 protocol ip u32 match ip dst $IP_1 flowid 1:3
gerasimos_h _________________ Superb! Mini Server Project Manager http://sms.it-ccs.com
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum