PDA

View Full Version : Limiting to National Traffic



Chilling_Silence
25-03-2003, 10:23 PM
Im going to be setting up some services soon when I get cable (Like a permanent host for my chat software), and Im wanting to know if its possible, and what sort of things its possible for... Im talking about limiting traffic to National, seeing as its free.

Is it possible?

PoWa
26-03-2003, 12:31 AM
I have been to your site, I see your a Believer as well :)

Chilling_Silence
26-03-2003, 01:00 AM
Yep, although I dont know what that has to do with Internet Traffic Limitation? ;-)

I should probably pull it down or actually update it...
A series began about 5 weeks ago, working thru Revelation :-)

'Spect it'll take around a year or so to actually get through the whole lot...
And come to think of it, updating the site may not be a bad idea... just keeping the messages....

Hmmm.... At least it'll give me something to do during this (Forecasted) long night ahead.

Beats programming for the time being ;-)

*Realizes he's rambling on.. most likely due to lack of Coke in the last two days.. Only 2 Diet-Cokes and 1 L&P*

-=JM=-
26-03-2003, 01:03 AM
Well generally on cable national traffic is charged at a 10th of the international traffic not free.

As for blocking out IPs. I'm assuming this is just for the apache webserver I'd look into finding out what netblocks are owned in NZ and allowing those and only those to connect to the server.

Chilling_Silence
26-03-2003, 01:30 AM
Really?

Im sure when I last enquired it was free?

Could it be ISP-Specific? Maybe Ihug are... I hope so, but I'll look into that :-)

Im actually not looking to serve websites, rather host chat sessions using my Chat software Ive written.

The host file is called MOS.EXE (Stands for MOO Object Server-side), and it hosts on Port 1200. Im obviously going to have to check with Ihug that the T&C allow this sort of thing, but how would I go about doing that (Block the IP's I mean)?

Chilling_Silence
26-03-2003, 02:02 AM
Well, Ihug do offer Nation Traffic Unlimited for free:

JetStart Services with Ihug (http://www.ihug.co.nz/products/connection/jetstreamstarter/index.html)

And it doesnt say anything in the Terms and Conditions that I cannot host using my Chat Software, but still, I will be on the phone to Ihug tomorrow to check it out just in case :-)
Ihug's Terms and Conditions (http://www.ihug.co.nz/legal/tandc.html)

Now, Just to filter it to NZ on certain ports :-)

Gorela
26-03-2003, 10:27 AM
Howdy Chilling,

I had thought I had read that iHug didn't allow you to run a server, the same as xtra.......

Anyway, there is a linux program portsentry that allows blocking of IP addresses. There is an article here (http://www.linuxworld.com/site-stories/2001/1002.portsentry.html) but when I went to Psionics web site you end up going to Cisco Systems. Not to sure what is going on there.

The article mentions that it is included in Redhat distros so that shouldn't pose a problem. It may well be available at rpmfind (http://rpmfind.net) which is a great place to look for lots of linux stuff especially as you can check the dependencies prior to downloading ;)

Clueless
26-03-2003, 10:31 AM
Cable?????
surely not in AK...

Do you by any chance mean DSL?

If so its a very different kettle of fish.

.Clueless

Chilling_Silence
26-03-2003, 11:02 AM
Thanks gorela, but what about for doze? I was hoping to stick with .NET server for the first little while maybe...

Can you remember where in the T&C you saw that? I couldnt see anything about that last night?

Ah, yes.. ADSL.. I remember the differences.. but anyways.. Its JetStart Im going to be using.

Anyways.. My chat program worked mint yesterday with CyberChuck hosting it, and 3 of us in the room... He was downloading too.. using a manager sucking ALL the bandwidth ;-)

whetu
26-03-2003, 01:30 PM
Hi Chilling Silence,
Below I have pasted the code to a script that I use on my Direct Connect Hub to block out international IP's. It might be of some help to you

'=====================================
' Direct Connect Hub IP Filter script
'-------------------------------------
' version: 1.0 (010629)
' author: [FF]yopo
' email: yopo@hotmail.com
'=====================================
' This script will check users when
' connecting to the hub, and if the
' IP number is not in the oAllow list
' it will disconnect the client. You
' can also configure it to allow full
' A-, B- or C-subnets (see the
' examples below). It will also send
' a message to the user. The script
' is useful if you want to keep the
' hub open only for connection from a
' specific ISP, network or region.
'=====================================

Dim sBotName
Dim oAllow
Dim sRejectMessage

Sub Main()
Set oAllow = CreateObject("Scripting.Dictionary")

'Set these basic parameters
sBotName = "IPBotNZ" ' <- name of the bot

'The message to send to denied clients
sRejectMessage = "Sorry, no connections are allowed to those outside of
New Zealand."

'Add new entries for each ip number or subnet you want to allow.
'Here are some examples of the syntax; the "descriptions" can be
'anything, except for an empty string. Remove the examples when
'you add your own.

oAllow("202.0.*") = "NZ"
oAllow("202.1.*") = "NZ"
oAllow("202.2.*") = "NZ"
oAllow("202.3.*") = "NZ"
oAllow("202.4.*") = "NZ"
oAllow("202.6.*") = "NZ"
oAllow("202.7.*") = "NZ"
oAllow("202.8.*") = "NZ"
oAllow("202.12.*") = "NZ"
oAllow("202.14.*") = "NZ"
oAllow("202.20.*") = "NZ"
oAllow("202.21.*") = "NZ"
oAllow("202.22.*") = "NZ"
oAllow("202.27.*") = "NZ"
oAllow("202.36.*") = "NZ"
oAllow("202.37.*") = "NZ"
oAllow("202.46.*") = "NZ"
oAllow("202.49.*") = "NZ"
oAllow("202.50.*") = "NZ"
oAllow("202.73.*") = "NZ"
oAllow("202.74.*") = "NZ"
oAllow("202.78.*") = "NZ"
oAllow("202.83.*") = "NZ"
oAllow("202.89.*") = "NZ"
oAllow("202.124.*") = "NZ"
oAllow("202.148.*") = "NZ"
oAllow("202.154.*") = "NZ"
oAllow("202.180.*") = "NZ"
oAllow("203.79.*") = "NZ"
oAllow("203.96.*") = "NZ"
oAllow("203.97.*") = "NZ"
oAllow("203.98.*") = "NZ"
oAllow("203.99.*") = "NZ"
oAllow("203.109.*") = "NZ"
oAllow("203.110.*") = "NZ"
oAllow("203.114.*") = "NZ"
oAllow("203.144.*") = "NZ"
oAllow("203.152.*") = "NZ"
oAllow("203.167.*") = "NZ"
oAllow("203.173.*") = "NZ"
oAllow("210.48.*") = "NZ"
oAllow("210.54.*") = "NZ"
oAllow("210.55.*") = "NZ"
oAllow("210.56.*") = "NZ"
oAllow("210.86.*") = "NZ"
oAllow("218.101.*") = "NZ"
oAllow("219.88.*") = "NZ"
oAllow("203.114.*") = "NZ"
oAllow("132.181.*") = "Uni"
oAllow("192.168.*") = "Flat"

End Sub


Sub NewUserConnected(curUser)

Dim sIPfull
Dim sIPc, sIPb, sIPa

sIPfull = curUser.IP()
sIPc = Left(sIPfull, InStrRev(sIPfull, ".") - 1)
sIPb = Left(sIPc, InStrRev(sIPc, ".") - 1)
sIPa = Left(sIPb, InStrRev(sIPb, ".") - 1)
sIPa = sIPa & ".*"
sIPb = sIPb & ".*"
sIPc = sIPc & ".*"

If Not (curUser.bOperator Or oAllow.Exists(sIPfull) Or _
oAllow.Exists(sIPc) Or oAllow.Exists(sIPb) Or _
oAllow.Exists(sIPa)) Then
curUser.PrivateMessage CStr(sBotName), CStr(sRejectMessage)
frmHub.DoEventsForMe
curUser.Disconnect
End If

End Sub

Chilling_Silence
26-03-2003, 03:31 PM
Okay, so I can limit the IP's like that.. I guess then at a later date if somebody cannot connect to me then I can allow their IP range :-)

Thanks for that.. now, just to figure out what to do with it....

*Needs a router*

;-)