Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » SMS User Support

Post new topic   Reply to topic
Is It possible to use sms & gateway..
View previous topic :: View next topic  
Author Message
xaiganx
Junior Member


Joined: 19 Feb 2012
Posts: 1

PostPosted: Sun Feb 19, 2012 8:38 pm    Post subject: Is It possible to use sms & gateway.. Reply with quote

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.
Smile
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Mon Feb 20, 2012 12:54 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » SMS User Support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional