@ Frater - AsiaBlock

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3 ... 12, 13, 14, 15, 16  Next
Author Message
Dark_Shadow
DD-WRT Guru


Joined: 31 Aug 2009
Posts: 2448
Location: Third Rock from the Sun

PostPosted: Fri Jul 02, 2010 22:12    Post subject: Reply with quote
I am getting hammered on my http server and have added what I thought was the right subnet to asia.spam, stopped and restarted asiablock, yet It still persists.

Culprit = 193.170.211.203

Subnet = 193.170.208.0/22

Is this right?

_________________
Peacock Thread-FAQ -- dd-wrt Wiki

Testing Multiple Routers -- Bootloader Collection Project -- My Wiki
Sponsor
Masterman
DD-WRT Guru


Joined: 24 Aug 2009
Posts: 2070
Location: South Florida

PostPosted: Fri Jul 02, 2010 22:28    Post subject: Reply with quote
Dark_Shadow wrote:
I am getting hammered on my http server and have added what I thought was the right subnet to asia.spam, stopped and restarted asiablock, yet It still persists.

Culprit = 193.170.211.203

Subnet = 193.170.208.0/22

Is this right?


No..

Code:
whois 193.170.211.203


Code:
route:        193.170.0.0/15
descr:        ACOnet, Provider Local Registry Block
origin:       AS1853
mnt-by:       AS1853-MNT
source:       RIPE # Filtered



Enter this is CLI:

Code:
echo 193.170.0.0/15>>/opt/etc/asia.spam


Code:
service asiablock start

_________________
Optware, the Right Way
Asus RT-AC68U
Asus RT-N66U
Asus RT-N10
Asus RT-N12
Asus RT-N16 x5
Asus WL520gU
Engenious ECB350
Linksys WRT600Nv1.1
Linksys WRT610Nv1
Linksys E2000
Netgear WNDR3300
SonicWall NSA220W
SonicWall TZ215W
SonicWall TZ205W
SonicWall TZ105W
Dark_Shadow
DD-WRT Guru


Joined: 31 Aug 2009
Posts: 2448
Location: Third Rock from the Sun

PostPosted: Fri Jul 02, 2010 22:43    Post subject: Reply with quote
still getting past..
_________________
Peacock Thread-FAQ -- dd-wrt Wiki

Testing Multiple Routers -- Bootloader Collection Project -- My Wiki
buddee
DD-WRT Guru


Joined: 06 Feb 2010
Posts: 7401
Location: Little Rock

PostPosted: Sat Jul 03, 2010 1:11    Post subject: Reply with quote
Dark_Shadow wrote:


Subnet = 193.170.208.0/22

Is this right?


When ran through cidr calc, the range is 193.170.208.0 - 193.170.211.255 so what you posted looks correct. Most likely would try and see.

_________________
Wireless N Config | Linking Routers | DD-WRT Wiki | DD-WRT Builds | Peacock - Broadcom FAQ

Having problems with port forwarding? Check out Port Forward Troubleshooting for more info.
Dark_Shadow
DD-WRT Guru


Joined: 31 Aug 2009
Posts: 2448
Location: Third Rock from the Sun

PostPosted: Sat Jul 03, 2010 1:58    Post subject: Reply with quote
buddee wrote:
Dark_Shadow wrote:


Subnet = 193.170.208.0/22

Is this right?


When ran through cidr calc, the range is 193.170.208.0 - 193.170.211.255 so what you posted looks correct. Most likely would try and see.
Yea I tried that first but 193.170.211.203 is still hammering away. At what on port 80 I don't know.

Looks like they are trying to break into myphpadmin

Code:
193.170.211.203 - - [02/Jul/2010:21:59:02 -0400] "GET /PHPMYADMIN/index.php?lang=en&server=1&pma_username=root&pma_password=quebec HTTP/1.0" 302 -
193.170.211.203 - - [02/Jul/2010:21:59:03 -0400] "GET /PHPMYADMIN/index.php?token=ccacdec3eeb1f88d5bae2da8541390e2 HTTP/1.0" 200 7648

_________________
Peacock Thread-FAQ -- dd-wrt Wiki

Testing Multiple Routers -- Bootloader Collection Project -- My Wiki
Dark_Shadow
DD-WRT Guru


Joined: 31 Aug 2009
Posts: 2448
Location: Third Rock from the Sun

PostPosted: Sat Jul 03, 2010 2:24    Post subject: Reply with quote
I don't understand, I've tried both ways and I know that asiablock is doing something with it cause it adds entries next to the subnet I have added. But nether is blocking that ip address.


EDIT:

193.170.208.0/22 in asia.spam is working. the ip address is being blocked. don't understand why it took so long.

_________________
Peacock Thread-FAQ -- dd-wrt Wiki

Testing Multiple Routers -- Bootloader Collection Project -- My Wiki
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Sat Jul 03, 2010 3:35    Post subject: Reply with quote
Masterman wrote:
Dark_Shadow wrote:
I am getting hammered on my http server and have added what I thought was the right subnet to asia.spam, stopped and restarted asiablock, yet It still persists.

Culprit = 193.170.211.203

Subnet = 193.170.208.0/22

Is this right?


No..

Code:
whois 193.170.211.203


Code:
route:        193.170.0.0/15
descr:        ACOnet, Provider Local Registry Block
origin:       AS1853
mnt-by:       AS1853-MNT
source:       RIPE # Filtered


Yes and No....
You are supposed to use the subnet given in "inetnum" not the one in route....
But it depends on the provider and what you want....

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
niagafall
DD-WRT Novice


Joined: 28 Jul 2010
Posts: 4

PostPosted: Wed Sep 01, 2010 14:46    Post subject: question on asia.spam Reply with quote
So I noticed that someone was trying to get in through ssh and I wanted to block the ip.

Following the example I did:
echo 217.219.115.0/18>>/opt/etc/asia.spam
and checked to see its in /opt/etc/asia.spam
then restarted firewall with service asiablock start

but now when i check the file /opt/etc/asia.spam the entry I put there is gone, and when i grep iptables I dont see the ip starting with 217 at all.

Any idea what Im doing wrong?

Thanks
Masterman
DD-WRT Guru


Joined: 24 Aug 2009
Posts: 2070
Location: South Florida

PostPosted: Wed Sep 01, 2010 16:19    Post subject: Re: question on asia.spam Reply with quote
niagafall wrote:
So I noticed that someone was trying to get in through ssh and I wanted to block the ip.

Following the example I did:
echo 217.219.115.0/18>>/opt/etc/asia.spam
and checked to see its in /opt/etc/asia.spam
then restarted firewall with service asiablock start

but now when i check the file /opt/etc/asia.spam the entry I put there is gone, and when i grep iptables I dont see the ip starting with 217 at all.

Any idea what Im doing wrong?

Thanks


When you restarted the asiablock service AFTER entering the new IP block, did it register an output and Download a new IP block list?

_________________
Optware, the Right Way
Asus RT-AC68U
Asus RT-N66U
Asus RT-N10
Asus RT-N12
Asus RT-N16 x5
Asus WL520gU
Engenious ECB350
Linksys WRT600Nv1.1
Linksys WRT610Nv1
Linksys E2000
Netgear WNDR3300
SonicWall NSA220W
SonicWall TZ215W
SonicWall TZ205W
SonicWall TZ105W
Vess
DD-WRT Novice


Joined: 18 Oct 2010
Posts: 37

PostPosted: Wed Oct 27, 2010 4:13    Post subject: Trying to run asiablock and stophammer with no luck Reply with quote
I installed optware and want to run asiablock and stophammer I enabled the services and then I start asiablock. The script does some activity and then it ends with

S95asiablock: /opt/etc/iptables.asia is not executed in rc_firewall, I will add it!
S95asiablock: Stop iptables
S95asiablock: Start iptables
Bad argument `NEW'
S95asiablock: It took 6 seconds to load 367 rules into iptables

I check iptables and there is nothing added. Same error happens when I disable asiablock or stophammer services

S95asiablock: iptables.asia will be removed from rc_firewall
S95asiablock: Stop iptables
S95asiablock: Start iptables
Bad argument `NEW'

Any ideas? Thanks in advance.
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Wed Oct 27, 2010 6:09    Post subject: Re: Trying to run asiablock and stophammer with no luck Reply with quote
Vess wrote:
I installed optware and want to run asiablock and stophammer I enabled the services and then I start asiablock. The script does some activity and then it ends with

S95asiablock: /opt/etc/iptables.asia is not executed in rc_firewall, I will add it!
S95asiablock: Stop iptables
S95asiablock: Start iptables
Bad argument `NEW'
S95asiablock: It took 6 seconds to load 367 rules into iptables

I check iptables and there is nothing added. Same error happens when I disable asiablock or stophammer services

S95asiablock: iptables.asia will be removed from rc_firewall
S95asiablock: Stop iptables
S95asiablock: Start iptables
Bad argument `NEW'

Any ideas? Thanks in advance.


Check your rc_firewall.
You are also using some of your own rules.
I think it doesn't support the method 'NEW' which is used in many examples....

If a line comes after the 'ESTABLISHED, RELATED' it's implicitly a NEW connection...

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
Vess
DD-WRT Novice


Joined: 18 Oct 2010
Posts: 37

PostPosted: Wed Oct 27, 2010 12:13    Post subject: Reply with quote
I will give it a try and let you know. Thanks
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Wed Oct 27, 2010 14:47    Post subject: Re: question on asia.spam Reply with quote
niagafall wrote:
So I noticed that someone was trying to get in through ssh and I wanted to block the ip.

Following the example I did:
echo 217.219.115.0/18>>/opt/etc/asia.spam
and checked to see its in /opt/etc/asia.spam
then restarted firewall with service asiablock start

but now when i check the file /opt/etc/asia.spam the entry I put there is gone, and when i grep iptables I dont see the ip starting with 217 at all.

Any idea what Im doing wrong?

Thanks


217.219.115.0/18 is not a valid network address
It's an odd number (115), so it can't be less than a /24

My script does some sanity-checks and it will throw out that line.

ipcalc -n 217.219.115.0/18
NETWORK=217.219.64.0

You need to use 217.219.64.0/18 or 217.219.115.0/24 depending on what you want.....

Check this to find out how the CIDR-notation works:
http://en.wikipedia.org/wiki/CIDR_notation

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
cedriclille
DD-WRT Novice


Joined: 23 Jan 2008
Posts: 24

PostPosted: Thu Nov 04, 2010 10:47    Post subject: Reply with quote
Hello,

I try to put this firewall script, using OPTRW asterisk and asiablock based on Frater's script.

/opt/etc/init.d/S90asterisk restart
wanf=`nvram get wan_iface`
iptables -I INPUT 2 -i $wanf -p udp --dport 5060 -j logdrop
iptables -I INPUT 2 -i $wanf -p udp --dport 5060 -m state --state NEW -m limit --limit 3/min -j logaccept
iptables -I INPUT 2 -i $wanf -p udp -j world
iptables -I INPUT -p udp -i $wanf --dport 12000:13000 -j ACCEPT
iptables -I INPUT -p udp -i $wanf --dport 2727 -j ACCCEPT
iptables -I FORWARD 1 -i $wanf -p tcp --dport 20:1024 -j asia
iptables -D FORWARD `iptables --line-numbers -nL FORWARD | grep ESTABLISHED | tail -n1 | awk '{print $1}'`
iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT

My goals are :

- access asterisk outside from my Lan but only from France (I modified S95asiablock with "noAsia="fr")
- try to block bruteforce Asterisk hacks with limiting connections attempts to 3/mn.


This morning I had a brute force attack from UK [213.174.xxx.xxx] ...

Where am I wrong ... Is Frater somewhere out there ??

Thanks
Masterman
DD-WRT Guru


Joined: 24 Aug 2009
Posts: 2070
Location: South Florida

PostPosted: Thu Nov 04, 2010 17:12    Post subject: Reply with quote
cedriclille wrote:
Hello,

I try to put this firewall script, using OPTRW asterisk and asiablock based on Frater's script.

/opt/etc/init.d/S90asterisk restart
wanf=`nvram get wan_iface`
iptables -I INPUT 2 -i $wanf -p udp --dport 5060 -j logdrop
iptables -I INPUT 2 -i $wanf -p udp --dport 5060 -m state --state NEW -m limit --limit 3/min -j logaccept
iptables -I INPUT 2 -i $wanf -p udp -j world
iptables -I INPUT -p udp -i $wanf --dport 12000:13000 -j ACCEPT
iptables -I INPUT -p udp -i $wanf --dport 2727 -j ACCCEPT
iptables -I FORWARD 1 -i $wanf -p tcp --dport 20:1024 -j asia
iptables -D FORWARD `iptables --line-numbers -nL FORWARD | grep ESTABLISHED | tail -n1 | awk '{print $1}'`
iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT

My goals are :

- access asterisk outside from my Lan but only from France (I modified S95asiablock with "noAsia="fr")
- try to block bruteforce Asterisk hacks with limiting connections attempts to 3/mn.


This morning I had a brute force attack from UK [213.174.xxx.xxx] ...

Where am I wrong ... Is Frater somewhere out there ??

Thanks


This is how your firewall should look. Fraters fixtables script negates the use of these first two lines (bottom to top):

Code:
iptables -D FORWARD `iptables --line-numbers -nL FORWARD | grep ESTABLISHED | tail -n1 | awk '{print $1}'`
iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT



Corrected:

wanf=`get_wanface`
iptables -I INPUT 2 -i $wanf -p udp --dport 5060 -j logdrop
iptables -I INPUT 2 -i $wanf -p udp --dport 5060 -m state --state NEW -m limit --limit 3/min --limit-burst 3 -j logaccept
iptables -I INPUT 2 -i $wanf -p udp --dport 12000:13000 -j ACCEPT
iptables -I INPUT 2 -i $wanf -p udp --dport 2727 -j ACCEPT
iptables -I INPUT 2 -i $wanf -p tcp -j world
iptables -I INPUT 2 -i $wanf -p tcp -j asia
iptables -I FORWARD 1 -i $wanf -p tcp --dport 20:1024 -j asia


Furthermore, why are you using the stateless UDP as the protocol?

Quote:
(I modified S95asiablock with "noAsia="fr")



It should be ISO-ham "fr"

_________________
Optware, the Right Way
Asus RT-AC68U
Asus RT-N66U
Asus RT-N10
Asus RT-N12
Asus RT-N16 x5
Asus WL520gU
Engenious ECB350
Linksys WRT600Nv1.1
Linksys WRT610Nv1
Linksys E2000
Netgear WNDR3300
SonicWall NSA220W
SonicWall TZ215W
SonicWall TZ205W
SonicWall TZ105W
Goto page Previous  1, 2, 3 ... 12, 13, 14, 15, 16  Next Display posts from previous:    Page 13 of 16
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
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