Ir para conteúdo
  • Cadastre-se

Comandos IP Tables / Database Comandas


Posts Recomendados

Só server em Linux, não sei exatamente como para que funciona cada comando, se tiver alguém que esclareça é melhor, será reputado também.


iptables -N conn-flood

iptables -I INPUT 1 -p tcp --syn -j conn-flood

iptables -A conn-flood -m limit --limit 7/s --limit-burst 20 -j RETURN

iptables -A conn-flood -j DROP

iptables -A INPUT -p icmp -m limit --limit 1/s --limit-burst 1 -j ACCEPT

iptables -A INPUT -p icmp -j DROP



echo "Block TCP-CONNECT scan attempts (SYN bit packets)"

iptables -A INPUT -p tcp --syn -j DROP

echo "Block TCP-SYN scan attempts (only SYN bit packets)"

iptables -A INPUT -m conntrack --ctstate NEW -p tcp --tcp-flags SYN,RST,ACK,FIN,URG,PSH SYN -j DROP

echo "Block TCP-FIN scan attempts (only FIN bit packets)"

iptables -A INPUT -m conntrack --ctstate NEW -p tcp --tcp-flags SYN,RST,ACK,FIN,URG,PSH FIN -j DROP

echo "Block TCP-ACK scan attempts (only ACK bit packets)"

iptables -A INPUT -m conntrack --ctstate NEW -p tcp --tcp-flags SYN,RST,ACK,FIN,URG,PSH ACK -j DROP

echo "Block TCP-NULL scan attempts (packets without flag)"

iptables -A INPUT -m conntrack --ctstate INVALID -p tcp --tcp-flags ! SYN,RST,ACK,FIN,URG,PSH SYN,RST,ACK,FIN,URG,PSH -j DROP

echo "Block "Christmas Tree" TCP-XMAS scan attempts (packets with FIN, URG, PSH bits)"

iptables -A INPUT -m conntrack --ctstate NEW -p tcp --tcp-flags SYN,RST,ACK,FIN,URG,PSH FIN,URG,PSH -j DROP


echo "Block DOS - Ping of Death"

iptables -A INPUT -p ICMP --icmp-type echo-request -m length --length 60:65535 -j ACCEPT

echo "Block DOS - Teardrop"

iptables -A INPUT -p UDP -f -j DROP

echo "Block DDOS - SYN-flood"

iptables -A INPUT -p TCP --syn -m iplimit --iplimit-above 9 -j DROP

echo "Block DDOS - Smurf"

iptables -A INPUT -m pkttype --pkt-type broadcast -j DROP

iptables -A INPUT -p ICMP --icmp-type echo-request -m pkttype --pkttype broadcast -j DROP

iptables -A INPUT -p ICMP --icmp-type echo-request -m limit --limit 3/s -j ACCEPT

echo "Block DDOS - UDP-flood (Pepsi)"

iptables -A INPUT -p UDP --dport 7 -j DROP

iptables -A INPUT -p UDP --dport 19 -j DROP

echo "Block DDOS - SMBnuke"

iptables -A INPUT -p UDP --dport 135:139 -j DROP

iptables -A INPUT -p TCP --dport 135:139 -j DROP

echo "Block DDOS - Connection-flood"

iptables -A INPUT -p TCP --syn -m iplimit --iplimit-above 3 -j DROP

echo "Block DDOS - Fraggle"

iptables -A INPUT -p UDP -m pkttype --pkt-type broadcast -j DROP

iptables -A INPUT -p UDP -m limit --limit 3/s -j ACCEPT

echo "Block DDOS - Jolt"

iptables -A INPUT -p ICMP -f -j DROP

Database Comandos.

--------------------------------------------------------------------

DROP USER 'pma'@'localhost';

--------------------------------------------------------------------

ALTER TABLE `players` ADD `exphist_lastexp` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `exphist1` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `exphist2` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `exphist3` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `exphist4` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `exphist5` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `exphist6` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `exphist7` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `onlinetimetoday` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `onlinetime1` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `onlinetime2` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `onlinetime3` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `onlinetime4` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `onlinetime5` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `onlinetime6` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `onlinetime7` BIGINT( 255 ) NOT NULL DEFAULT '0',

ADD `onlinetimeall` BIGINT( 255 ) NOT NULL DEFAULT '0';

--------------------------------------------------------------------

UPDATE `players` SET `exphist_lastexp`=`players`.`experience`

--------------------------------------------------------------------

CREATE TABLE IF NOT EXISTS `bounty_hunters` (

`id` int(11) NOT NULL auto_increment,

`fp_id` int(11) NOT NULL,

`sp_id` int(11) NOT NULL,

`k_id` int(11) NOT NULL,

`added` int(15) NOT NULL,

`prize` bigint(20) NOT NULL,

`killed` int(11) NOT NULL,

`kill_time` int(15) NOT NULL,

PRIMARY KEY (`id`)

) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--------------------------------------------------------------------

ALTER TABLE `guilds`

ADD `invited_to` INT( 11 ) NOT NULL ,

ADD `invited_by` INT( 11 ) NOT NULL ,

ADD `in_war_with` INT( 11 ) NOT NULL ,

ADD `kills` INT( 11 ) NOT NULL ,

ADD `show` SMALLINT( 1 ) NOT NULL ,

ADD `war_time` INT( 11 ) NOT NULL ;

--------------------------------------------------------------------

CREATE TABLE `deaths_in_wars` (

`guild_id` INT( 11 ) NOT NULL ,

`player_id` INT( 11 ) NOT NULL ,

`killer_guild` INT( 11 ) NOT NULL ,

`killer` INT( 11 ) NOT NULL ,

`date` INT( 11 ) NOT NULL ,

`result1` INT( 11 ) NOT NULL ,

`result2` INT( 11 ) NOT NULL

) ENGINE = MYISAM ;

--------------------------------------------------------------------

UPDATE `guilds` SET `invited_to` = 0, `invited_by` = 0, `in_war_with` = 0, `kills` = 0, `show` = 0, `war_time` = 0 WHERE `id` > 0;

--------------------------------------------------------------------

Change Temple position

UPDATE Players SET posx =32360, posy =31782, posz =7;

--------------------------------------------------------------------

UPDATE accounts SET premdays=4500;

--------------------------------------------------------------------

Database Cleanup

DELETE FROM players WHERE level < 20 AND lastlogin < UNIX_TIMESTAMP() - 15*24*60*60

DELETE FROM players WHERE deleted = 1;


DELETE FROM player_deaths WHERE player_id NOT IN (SELECT id FROM players);

DELETE FROM player_depotitems WHERE player_id NOT IN (SELECT id FROM players);

DELETE FROM player_items WHERE player_id NOT IN (SELECT id FROM players);

DELETE FROM player_skills WHERE player_id NOT IN (SELECT id FROM players);

DELETE FROM player_spells WHERE player_id NOT IN (SELECT id FROM players);

DELETE FROM player_storage WHERE player_id NOT IN (SELECT id FROM players);

DELETE FROM player_viplist WHERE player_id NOT IN (SELECT id FROM players);

--------------------------------------------------------------------

Bless for all

UPDATE `players` SET `blessings`=31;

--------------------------------------------------------------------

•Remove a specific item (here id 2160) completely from the game (depot, players, houses)

DELETE FROM player_depotitems, player_items, tile_items WHERE itemtype = 2160;

--------------------------------------------------------------------

•Delete all items from player id.

DELETE FROM `player_depotitems` , `player_items` WHERE `player_id` = '1234'

--------------------------------------------------------------------

•Select all PageAcces higher than zero.

SELECT * FROM `accounts` WHERE `page_access` > 0 LIMIT 0 , 30

--------------------------------------------------------------------

•Select all Gamemaster.

SELECT * FROM `players` WHERE `group_id` > 1 LIMIT 0 , 30

--------------------------------------------------------------------

ALTER TABLE players AUTO_INCREMENT = 7;

--------------------------------------------------------------------

SET GLOBAL max_allowed_packet = 16776192;

--------------------------------------------------------------------

ALTER TABLE `guilds` ADD `wins` INT NOT NULL DEFAULT '0';

ALTER TABLE `guilds` ADD `losses` INT NOT NULL DEFAULT '0';

ALTER TABLE `guilds` ADD `draws` INT NOT NULL DEFAULT '0';

--------------------------------------------------------------------.

Resete Database Comando

UPDATE `ot`.`players` SET `level` = '8',

`health` = '180',

`healthmax` = '180',

`experience` = '4200',

`mana` = '35',

`manamax` = '35',

`cap` = '400'



UPDATE `ot`.`players_skills` SET `value` = '10' 
War System 100% Database Comando

-------------------------------------------------------

CREATE TABLE IF NOT EXISTS `guild_wars` (

`id` INT NOT NULL AUTO_INCREMENT,

`guild_id` INT NOT NULL,

`enemy_id` INT NOT NULL,

`begin` BIGINT NOT NULL DEFAULT '0',

`end` BIGINT NOT NULL DEFAULT '0',

`frags` INT UNSIGNED NOT NULL DEFAULT '0',

`payment` BIGINT UNSIGNED NOT NULL DEFAULT '0',

`guild_kills` INT UNSIGNED NOT NULL DEFAULT '0',

`enemy_kills` INT UNSIGNED NOT NULL DEFAULT '0',

`status` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',

PRIMARY KEY (`id`),

KEY `status` (`status`),

KEY `guild_id` (`guild_id`),

KEY `enemy_id` (`enemy_id`)

) ENGINE=InnoDB;

---------------------------------------------------------------

ALTER TABLE `guild_wars`

ADD CONSTRAINT `guild_wars_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE,

ADD CONSTRAINT `guild_wars_ibfk_2` FOREIGN KEY (`enemy_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;

---------------------------------------------------------------

ALTER TABLE `guilds` ADD `balance` BIGINT UNSIGNED NOT NULL AFTER `motd`;

------------------------------------------------------------------

CREATE TABLE IF NOT EXISTS `guild_kills` (

`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,

`guild_id` INT NOT NULL,

`war_id` INT NOT NULL,

`death_id` INT NOT NULL

) ENGINE = InnoDB;

-------------------------------------------------------------------------------

ALTER TABLE `guild_kills`

ADD CONSTRAINT `guild_kills_ibfk_1` FOREIGN KEY (`war_id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE,

ADD CONSTRAINT `guild_kills_ibfk_2` FOREIGN KEY (`death_id`) REFERENCES `player_deaths` (`id`) ON DELETE CASCADE,

ADD CONSTRAINT `guild_kills_ibfk_3` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;

------------------------------------------------------------------------------------

ALTER TABLE `killers` ADD `war` INT NOT NULL DEFAULT 0;

--------------------------------------------------------------------------------------

Link para o post
Compartilhar em outros sites

Vocês se preocupam mais com os créditos do que o conteúdo :O

Emprisionante

Créditos:

Talaturen

War System by Elf

Don daniello

Cykotitan - Stian

Arthur Luna

O Mais importante voçe não poe :angry2:

tumblrllvzjg0swl1qi6nua.gif
Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo