White List

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Author Message
toricred
DD-WRT Novice


Joined: 28 Jan 2010
Posts: 8

PostPosted: Sun Mar 07, 2010 0:38    Post subject: Reply with quote
For now I've set it up with reserved DHCP addresses and it's working. The only problem seems to be if the machine doesn't already have an address from the DHCP server then the packets aren't being passed to get the address. Is there a rule I need to add to allow for DHCP traffic from all devices?
Sponsor
GeeTek
DD-WRT Guru


Joined: 06 Jun 2006
Posts: 3763
Location: I'm the one on the plate.

PostPosted: Mon Mar 08, 2010 6:41    Post subject: Reply with quote
toricred wrote:
The only problem seems to be if the machine doesn't already have an address from the DHCP server then the packets aren't being passed to get the address. Is there a rule I need to add to allow for DHCP traffic from all devices?

No. You cannot prevent your clients from programming a static IP. What you need is called ARP binding, which is not currently supported with this firmware.

We are still trying to get sputnick to detonate properly, with no success. Please stop trying to start some shit with the forum.
toricred
DD-WRT Novice


Joined: 28 Jan 2010
Posts: 8

PostPosted: Mon Mar 08, 2010 14:10    Post subject: Reply with quote
I'm not trying to prevent static IP's. I just wanted to know how to allow DHCP. I've got it working now.

I'm unclear what the reference to sputnick and starting shit is. I'm just trying to understand how to do some small things through iptables not start any trouble.
liverpoolatnight
DD-WRT User


Joined: 29 May 2008
Posts: 243
Location: United Kingdom

PostPosted: Fri Apr 09, 2010 9:44    Post subject: Reply with quote
I was looking at something similar but installing two packages kmod-ipt-weburl & iptables-mod-weburl

https://forum.openwrt.org/viewtopic.php?id=17249

Is there anyway of just blocking urls like torrents without using a proxy server?

EDIT:

iptables -A wanout -i `nvram get lan_ifname` -d www.bbc.co.uk -j DROP

Ill give that a try tonight when i get home and report back or if someone can test it for me ill be greatfull

_________________
TP-Link TL-WDR3600 v1 [EU]: r36330 (07/16/18 )
D-Link DIR-615 D2 [EU]: r36330 (07/16/18 )
Mikrotik RB750r2 (OpenWrt 17.01.4)
EE BrightBox 1 aka A4001N (OpenWrt 17.01.4)
Sagemcom FAST@5364 (VDSL2,FTTC (Fibre to the Cabinet) Synced 65/17

Twitter: @francisuk1989
---------------------------------
Found a bug? Report it http://svn.dd-wrt.com
DD-WRT Official FB Group: https://www.facebook.com/groups/493762527744455
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Fri Apr 09, 2010 12:20    Post subject: Reply with quote
liverpoolatnight wrote:
Is there anyway of just blocking urls like torrents without using a proxy server?

This thread is about whitelisting which blocks everything by default and then allows certain things. To blacklist URL's you can use the standard Access Restrictions in the GUI which makes use of the ipt_webstr module.

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
liverpoolatnight
DD-WRT User


Joined: 29 May 2008
Posts: 243
Location: United Kingdom

PostPosted: Sat Apr 10, 2010 11:15    Post subject: Reply with quote
phuzi0n wrote:
you can use the standard Access Restrictions in the GUI which makes use of the ipt_webstr module.

Thanks Smile Could i block ranges of ips 192.168.4.5-192.168.4.9 using this wholelist or the wireless interface would be okay aswell Smile

_________________
TP-Link TL-WDR3600 v1 [EU]: r36330 (07/16/18 )
D-Link DIR-615 D2 [EU]: r36330 (07/16/18 )
Mikrotik RB750r2 (OpenWrt 17.01.4)
EE BrightBox 1 aka A4001N (OpenWrt 17.01.4)
Sagemcom FAST@5364 (VDSL2,FTTC (Fibre to the Cabinet) Synced 65/17

Twitter: @francisuk1989
---------------------------------
Found a bug? Report it http://svn.dd-wrt.com
DD-WRT Official FB Group: https://www.facebook.com/groups/493762527744455
MoonDrgn7
DD-WRT Novice


Joined: 26 Nov 2009
Posts: 10

PostPosted: Tue Jun 22, 2010 1:28    Post subject: Reply with quote
This script isnt working for me at all..... can someone tell me whats wrong with it?

# IP Tables White Listing script by phuzi0n -Tek @ http://www.dd-wrt.com/phpBB2/viewtopic.php?t=56588

# Set up the chain
iptables -N wanout
iptables -I INPUT -i `nvram get lan_ifname` -j wanout
iptables -I FORWARD -i `nvram get lan_ifname` -j wanout

# Create whitelist 'function' script
WOUT="/tmp/wanout"
echo 'iptables -I wanout $1 -j ACCEPT' > $WOUT
chmod 777 $WOUT

# Exempt Machine MAC
insmod ipt_mac
$WOUT '-m mac --mac-source XX:XX:XX:XX:XX:XX'

# Exempt Machine IP
$WOUT '-s 192.168.1.131'

# Allow everyone access to these sites
#$WOUT '-d www.google.com'
#$WOUT '-d www.yahoo.com'
#$WOUT '-d www.dd-wrt.com'

# Allow everyone access to these IP Addresses
#$WOUT '-d 74.125.67.100'
#$WOUT '-d 74.125.127.100'
#$WOUT '-d 74.125.45.100'
#$WOUT '-d 209.131.36.158'

#Allow everyone access to specific destination ports
$WOUT '-p udp --dport 8000'
$WOUT '-p tcp --dport 80'


# Everything else gets blocked
iptables -A wanout -j REJECT --reject-with icmp-proto-unreachable

Of course the MAC of the exempt machine is changed for its protection, but I have double and triple checked to make sure its the right one, and it is. My problem is that this script doesnt seem to be doing ANYTHING at all. It doesnt stop any of the other machines on my network from accessing the internet....

What I want to be able to do, is to only let specified machines access the internet, while everyone else can access anything on the local network.
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Tue Jun 22, 2010 1:50    Post subject: Reply with quote
Post the output from this command.

iptables -vnL

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
MoonDrgn7
DD-WRT Novice


Joined: 26 Nov 2009
Posts: 10

PostPosted: Tue Jun 22, 2010 2:10    Post subject: Reply with quote
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
464 40647 ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 DROP udp -- vlan1 * 0.0.0.0/0 0.0.0.0/0 udp dpt:520
0 0 DROP udp -- br0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:520
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:520
0 0 DROP icmp -- vlan1 * 0.0.0.0/0 0.0.0.0/0
0 0 DROP 2 -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT udp -- vlan1 * 0.0.0.0/0 0.0.0.0/0 udp dpt:5060
0 0 ACCEPT 0 -- lo * 0.0.0.0/0 0.0.0.0/0 state NEW
153 24773 logaccept 0 -- br0 * 0.0.0.0/0 0.0.0.0/0 state NEW
94 11885 DROP 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT 47 -- * vlan1 192.168.1.0/24 0.0.0.0/0
0 0 ACCEPT tcp -- * vlan1 192.168.1.0/24 0.0.0.0/0 tcp dpt:1723
0 0 ACCEPT 0 -- br0 br0 0.0.0.0/0 0.0.0.0/0
56 2712 TCPMSS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU
642 237K lan2wan 0 -- * * 0.0.0.0/0 0.0.0.0/0
567 231K ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 TRIGGER 0 -- vlan1 br0 0.0.0.0/0 0.0.0.0/0 TRIGGER type:in match:0 relate:0
75 6574 trigger_out 0 -- br0 * 0.0.0.0/0 0.0.0.0/0
75 6574 ACCEPT 0 -- br0 * 0.0.0.0/0 0.0.0.0/0 state NEW
0 0 DROP 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 799 packets, 790K bytes)
pkts bytes target prot opt in out source destination
Chain advgrp_1 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_10 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_2 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_3 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_4 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_5 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_6 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_7 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_8 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_9 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_1 (1 references)
pkts bytes target prot opt in out source destination
Chain grp_10 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_2 (1 references)
pkts bytes target prot opt in out source destination
Chain grp_3 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_4 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_5 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_6 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_7 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_8 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_9 (0 references)
pkts bytes target prot opt in out source destination
Chain lan2wan (1 references)
pkts bytes target prot opt in out source destination
642 237K grp_1 0 -- * * 0.0.0.0/0 0.0.0.0/0
642 237K grp_2 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain logaccept (1 references)
pkts bytes target prot opt in out source destination
153 24773 ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain logdrop (0 references)
pkts bytes target prot opt in out source destination
0 0 DROP 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain logreject (0 references)
pkts bytes target prot opt in out source destination
0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp reject-with tcp-reset
Chain trigger_out (1 references)
pkts bytes target prot opt in out source destination
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Tue Jun 22, 2010 3:02    Post subject: Reply with quote
None of it is there, are you saving it as a firewall script?
_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
MoonDrgn7
DD-WRT Novice


Joined: 26 Nov 2009
Posts: 10

PostPosted: Tue Jun 22, 2010 11:21    Post subject: Reply with quote
ok, so now I have it working it seems. didnt change anything but I did at that command you wanted me to report stuff from, to the end of the script. So now that it seems to be working, I have a question about the ports area. How can I open up all ports? instead of just those being able to be used?
MoonDrgn7
DD-WRT Novice


Joined: 26 Nov 2009
Posts: 10

PostPosted: Tue Jun 22, 2010 15:42    Post subject: Reply with quote
phuzi0n wrote:
None of it is there, are you saving it as a firewall script?


Am I not supposed to be saving it as a firewall script?
MoonDrgn7
DD-WRT Novice


Joined: 26 Nov 2009
Posts: 10

PostPosted: Tue Jun 22, 2010 16:10    Post subject: Reply with quote
this is what the command spit back out at me:

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
586 59531 wanout 0 -- br0 * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 DROP udp -- vlan1 * 0.0.0.0/0 0.0.0.0/0 udp dpt:520
0 0 DROP udp -- br0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:520
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:520
0 0 DROP icmp -- vlan1 * 0.0.0.0/0 0.0.0.0/0
0 0 DROP 2 -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT udp -- vlan1 * 0.0.0.0/0 0.0.0.0/0 udp dpt:5060
0 0 ACCEPT 0 -- lo * 0.0.0.0/0 0.0.0.0/0 state NEW
1 78 logaccept 0 -- br0 * 0.0.0.0/0 0.0.0.0/0 state NEW
29 6053 DROP 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
180 42249 wanout 0 -- br0 * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 47 -- * vlan1 192.168.1.0/24 0.0.0.0/0
0 0 ACCEPT tcp -- * vlan1 192.168.1.0/24 0.0.0.0/0 tcp dpt:1723
0 0 ACCEPT 0 -- br0 br0 0.0.0.0/0 0.0.0.0/0
19 900 TCPMSS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU
138 30738 lan2wan 0 -- * * 0.0.0.0/0 0.0.0.0/0
138 30738 ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 TRIGGER 0 -- vlan1 br0 0.0.0.0/0 0.0.0.0/0 TRIGGER type:in match:0 relate:0
0 0 trigger_out 0 -- br0 * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- br0 * 0.0.0.0/0 0.0.0.0/0 state NEW
0 0 DROP 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 789 packets, 783K bytes)
pkts bytes target prot opt in out source destination
Chain advgrp_1 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_10 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_2 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_3 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_4 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_5 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_6 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_7 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_8 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_9 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_1 (1 references)
pkts bytes target prot opt in out source destination
Chain grp_10 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_2 (1 references)
pkts bytes target prot opt in out source destination
Chain grp_3 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_4 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_5 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_6 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_7 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_8 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_9 (0 references)
pkts bytes target prot opt in out source destination
Chain lan2wan (1 references)
pkts bytes target prot opt in out source destination
138 30738 grp_1 0 -- * * 0.0.0.0/0 0.0.0.0/0
138 30738 grp_2 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain logaccept (1 references)
pkts bytes target prot opt in out source destination
1 78 ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain logdrop (0 references)
pkts bytes target prot opt in out source destination
0 0 DROP 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain logreject (0 references)
pkts bytes target prot opt in out source destination
0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp reject-with tcp-reset
Chain trigger_out (1 references)
pkts bytes target prot opt in out source destination
Chain wanout (2 references)
pkts bytes target prot opt in out source destination
540 59747 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:8000
0 0 ACCEPT 0 -- * * 192.168.1.129 0.0.0.0/0
0 0 ACCEPT 0 -- * * 192.168.1.131 0.0.0.0/0
192 37674 ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0 MAC DE:AD:CA:00:CA:FE
1 229 ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0 MAC 00:50:2C:A2:04:1B
32 4052 REJECT 0 -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-proto-unreachable
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Tue Jun 22, 2010 20:01    Post subject: Reply with quote
MoonDrgn7 wrote:
phuzi0n wrote:
None of it is there, are you saving it as a firewall script?

Am I not supposed to be saving it as a firewall script?

It should be a firewall script. I don't understand why you want to open up all ports though, if you allow every port then nothing will be blocked so the whitelist will be pointless.

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
MoonDrgn7
DD-WRT Novice


Joined: 26 Nov 2009
Posts: 10

PostPosted: Tue Jun 22, 2010 20:41    Post subject: Reply with quote
Even with the ports open, the IP and MAC is filtered right?

So even with the ports open, unless they have a MAC and an IP on the whitelist, they would not be able to get through, or am I missunderstanding something?
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next Display posts from previous:    Page 5 of 9
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