• November 01, 2024, 03:38:36 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: router DSL-2730U limit connection by iptables  (Read 4145 times)

iLinux85

  • Level 1 Member
  • *
  • Posts: 2
router DSL-2730U limit connection by iptables
« on: January 23, 2015, 11:08:13 AM »

i want to know how can i limit the whole network 192.168.1.0/24 with speed rate 30/kbps connection and allow specific ip for unlimited connection speed ?


my current iptables in the router

Code: [Select]
> iptables -vnL
Chain INPUT (policy ACCEPT 109K packets, 18M bytes)
 pkts bytes target     prot opt in     out     source               destination
 3725  613K ACCEPT     all  --  ppp0   *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
    0     0 ACCEPT     udp  --  ppp0   *       0.0.0.0/0            0.0.0.0/0           udp dpt:500
    0     0 ACCEPT     esp  --  ppp0   *       0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT     ah   --  ppp0   *       0.0.0.0/0            0.0.0.0/0
    0     0 ACCEPT    !esp  --  ppp0   *       0.0.0.0/0            0.0.0.0/0           MARK match 0x10000000/0x10000000
    0     0 ACCEPT    !ah   --  ppp0   *       0.0.0.0/0            0.0.0.0/0           MARK match 0x10000000/0x10000000
    0     0 ACCEPT     tcp  --  ppp0   *       0.0.0.0/0            0.0.0.0/0           tcp dpt:30005
    5   240 LOG        tcp  --  ppp0   *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x17/0x02 limit: avg 6/hour burst 5 LOG flags 0 level 1 prefix `Intrusion -> '
  480 34103 DROP       all  --  ppp0   *       0.0.0.0/0            0.0.0.0/0

Chain FORWARD (policy ACCEPT 282K packets, 20M bytes)
 pkts bytes target     prot opt in     out     source               destination
 7591  413K TCPMSS     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x06/0x02 TCPMSS clamp to PMTU
 1191  277K ACCEPT     udp  --  ppp0   *       0.0.0.0/0            192.168.1.4         udp dpt:24978
    0     0 ACCEPT     tcp  --  ppp0   *       0.0.0.0/0            192.168.1.4         tcp dpt:24978
 8178  447K TCPMSS     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x06/0x02 TCPMSS clamp to PMTU
18980 1052K TCPMSS     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x06/0x02 TCPMSS clamp to PMTU
38749 2140K TCPMSS     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x06/0x02 TCPMSS clamp to PMTU
 108K 6018K TCPMSS     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x06/0x02 TCPMSS clamp to PMTU
26992 2876K ACCEPT     all  --  ppp0   *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
    0     0 ACCEPT    !esp  --  ppp0   *       0.0.0.0/0            0.0.0.0/0           MARK match 0x10000000/0x10000000
    0     0 ACCEPT    !ah   --  ppp0   *       0.0.0.0/0            0.0.0.0/0           MARK match 0x10000000/0x10000000
    0     0 LOG        tcp  --  ppp0   *       0.0.0.0/0            0.0.0.0/0           tcp flags:0x17/0x02 limit: avg 6/hour burst 5 LOG flags 0 level 1 prefix `Intrusion -> '
    0     0 DROP       all  --  ppp0   *       0.0.0.0/0            0.0.0.0/0

Chain OUTPUT (policy ACCEPT 131K packets, 19M bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DROP       all  --  *      ppp0    0.0.0.0/0            239.255.255.250


my router information

Code: [Select]
Device Info

BoardID: DSL-2730U
Software Version: ME_1.00
Bootloader (CFE) Version: 1.0.37-106.5
DSL PHY and Driver Version: A2pD030g.d22j
Wireless Driver Version: 5.60.120.3.cpe4.406.0

This information reflects the current status of your WAN connection.

Line Rate - Upstream (Kbps): 508
Line Rate - Downstream (Kbps): 2045
LAN IPv4 Address: 192.168.1.1
MAC Address: 78:54:2e:7b:ab:f4
Default Gateway: ppp0
Primary DNS Server: 163.121.128.134
Secondary DNS Server: 163.121.128.135
LAN IPv6 Address:
Default IPv6 Gateway:
Logged

FurryNutz

  • Poweruser
  •   ▲
    ▲ ▲
  • *****
  • Posts: 49923
  • D-Link Global Forum Moderator
    • Router Troubleshooting
Re: router DSL-2730U limit connection by iptables
« Reply #1 on: January 23, 2015, 11:17:24 AM »

Link>Welcome!

  • What Hardware version is your modem? Look at the sticker under modem.
  • Link>What Firmware version is currently loaded? Found on the modems web page under status.
  • What region are you located?

I would review the user manual for QoS settings and configurations.

« Last Edit: January 23, 2015, 11:22:48 AM by FurryNutz »
Logged
Cable: 1Gb/50Mb>NetGear CM1200>DIR-882>HP 24pt Gb Switch. COVR-1202/2202/3902,DIR-2660/80,3xDGL-4500s,DIR-LX1870,857,835,827,815,890L,880L,868L,836L,810L,685,657,3x655s,645,628,601,DNR-202L,DNS-345,DCS-933L,936L,960L and 8000LH.