Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Limit the client IP

Junior Spellweaver
Joined
Sep 14, 2011
Messages
196
Reaction score
64
Hello Ragezoners,

I have today a method to limit client connection via IP with table SK_gamebang_ip.

//Re-Create table SK_gamebang_ip

First, you should Re-create SK_gamebang_ip table ...

PHP:
USE [SRO_VT_SHARD]
GO

/****** Object:  Table [dbo].[SK_gamebang_ip]    Script Date: 04/03/2012 14:30:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SK_gamebang_ip]') AND type in (N'U'))
DROP TABLE [dbo].[SK_gamebang_ip]
GO

USE [SRO_VT_SHARD]
GO

/****** Object:  Table [dbo].[SK_gamebang_ip]    Script Date: 04/03/2012 14:30:58 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[SK_gamebang_ip](
	[nID] [smallint] IDENTITY (1,1) NOT NULL,
	[ip] [int] NOT NULL,
	[capacity] [smallint] NOT NULL
) ON [PRIMARY]

-=-=--=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

//Create Procedure dbo.Adding_SK_gamebang_ip

Second, Lets create "Adding_SK_gamebang_ip" Procedure ...

PHP:
USE [SRO_VT_SHARD]
GO

/****** Object:  StoredProcedure [dbo].[Adding_SK_gamebang_ip]    Script Date: 04/03/2012 14:52:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Megaman963
-- Create date: 04/03/2012
-- Description:	Adding Limited Client Access to server via IP
-- =============================================
CREATE PROCEDURE [dbo].[Adding_SK_gamebang_ip] 
	-- Add the parameters for the stored procedure here
	@IP1 int, @IP2 int, @IP3 int, @IP4 int, @Capacity smallint
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
    declare @IP int
    declare @nip1 int
    declare @nip2 int
    declare @nip3 int
    declare @nip4 int
	set @nip1 = @IP1
	set @nip2 = @IP2 * 256
	set @nip3 = @IP3 * 256 * 256
	set @nip4 = @IP4 * 256 * 256 * 256
	set @IP = @nip1 + @nip2 + @nip3 + @nip4
	INSERT INTO [Vengard_ACCOUNT].[dbo].[SK_gamebang_ip]
           ([ip],[capacity]) VALUES (@IP,@Capacity)
END
GO

Now lets run the Procedure:

PHP:
exec Adding_SK_gamebang_ip <IP1>, <IP2>, <IP3>, <IP4>, <Numberofconnection> 
-- You have to replace <IP1> with first part of your ip, and so on. and <Numberofconnection> replace it with Number of client which connect per IP.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

After Adding, you have to refresh BangIP via SMC by going to ServerControl Tab and Right click on Gateway Server, and select "Refresh Franchise IP Data (PC bang)".

And you are finished ^^

if you see it nice topic, Don't forget !!

Rep + Like :thumbup1:
 
Last edited:
Elite Diviner
Joined
Sep 15, 2011
Messages
497
Reaction score
6
Re: [Release] Limit the client IP

hello

smc ip Do you limit?
 
Newbie Spellweaver
Joined
Sep 6, 2011
Messages
51
Reaction score
39
Re: [Release] Limit the client IP

And if I put my ip,what gonna happen? :D
 
Newbie Spellweaver
Joined
Oct 31, 2011
Messages
66
Reaction score
11
Re: [Release] Limit the client IP

Srrsly, you must input every player IP? :D
 
Junior Spellweaver
Joined
Sep 14, 2011
Messages
196
Reaction score
64
Skilled Illusionist
Joined
Mar 12, 2012
Messages
338
Reaction score
27
Re: [Release] Limit the client IP

um not just limit in server.cfg ?

NetCafeIPRefreshTime 10
MaxUserForNonePCBangIP 1
 
Newbie Spellweaver
Joined
Jan 20, 2008
Messages
32
Reaction score
2
Re: [Release] Limit the client IP

serend: i think that's enough ;)
 
Junior Spellweaver
Joined
Sep 14, 2011
Messages
196
Reaction score
64
Re: [Release] Limit the client IP

um not just limit in server.cfg ?

NetCafeIPRefreshTime 10
MaxUserForNonePCBangIP 1

Thanks for information ...

i was searching for it :D

Again, Thanks for sharing :):
 
Junior Spellweaver
Joined
Sep 14, 2011
Messages
196
Reaction score
64
Re: [Release] Limit the client IP

Nice Idea,

You can block IP address by this limitness.

Put the IP address, and set Capacity = 0

Done ...
 
Newbie Spellweaver
Joined
Nov 2, 2013
Messages
68
Reaction score
2
Re: [Release] Limit the client IP

I have a question: Why create it in SRO_VT_SHARD not SRO_VT_ACCOUNT? bcz I saw it already had in SRO_VT_ACCOUNT?
 
Back
Top