找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 4009|回复: 6

求救,求救,关于iptables

[复制链接]
发表于 2016-3-14 11:39 | 显示全部楼层 |阅读模式
  1. admin@RT-N16-0C4B:/tmp/home/root# iptables -t nat -A PREROUTING -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-port 1080
  2. iptables v1.3.8: Unknown arg `--match-set'
  3. Try `iptables -h' or 'iptables --help' for more information.
复制代码
  1. admin@RT-N16-0C4B:/tmp/home/root# iptables -h
  2. iptables v1.3.8

  3. Usage: iptables -[AD] chain rule-specification [options]
  4.        iptables -[RI] chain rulenum rule-specification [options]
  5.        iptables -D chain rulenum [options]
  6.        iptables -[LFZ] [chain] [options]
  7.        iptables -[NX] chain
  8.        iptables -E old-chain-name new-chain-name
  9.        iptables -P chain target [options]
  10.        iptables -h (print this help information)

  11. Commands:
  12. Either long or short options are allowed.
  13.   --append  -A chain            Append to chain
  14.   --delete  -D chain            Delete matching rule from chain
  15.   --delete  -D chain rulenum
  16.                                 Delete rule rulenum (1 = first) from chain
  17.   --insert  -I chain [rulenum]
  18.                                 Insert in chain as rulenum (default 1=first)
  19.   --replace -R chain rulenum
  20.                                 Replace rule rulenum (1 = first) in chain
  21.   --list    -L [chain]          List the rules in a chain or all chains
  22.   --flush   -F [chain]          Delete all rules in  chain or all chains
  23.   --zero    -Z [chain]          Zero counters in chain or all chains
  24.   --new     -N chain            Create a new user-defined chain
  25.   --delete-chain
  26.             -X [chain]          Delete a user-defined chain
  27.   --policy  -P chain target
  28.                                 Change policy on chain to target
  29.   --rename-chain
  30.             -E old-chain new-chain
  31.                                 Change chain name, (moving any references)
  32. Options:
  33.   --proto       -p [!] proto    protocol: by number or name, eg. `tcp'
  34.   --source      -s [!] address[/mask]
  35.                                 source specification
  36.   --destination -d [!] address[/mask]
  37.                                 destination specification
  38.   --in-interface -i [!] input name[+]
  39.                                 network interface name ([+] for wildcard)
  40.   --jump        -j target
  41.                                 target for rule (may load target extension)
  42.   --goto      -g chain
  43.                               jump to chain with no return
  44.   --match       -m match
  45.                                 extended match (may load extension)
  46.   --numeric     -n              numeric output of addresses and ports
  47.   --out-interface -o [!] output name[+]
  48.                                 network interface name ([+] for wildcard)
  49.   --table       -t table        table to manipulate (default: `filter')
  50.   --verbose     -v              verbose mode
  51.   --line-numbers                print line numbers when listing
  52.   --exact       -x              expand numbers (display exact values)
  53. [!] --fragment  -f              match second or further fragments only
  54.   --modprobe=<command>          try to insert modules using this command
  55.   --set-counters PKTS BYTES     set the counter during insert/append
  56. [!] --version   -V              print package version.
  57. admin@RT-N16-0C4B:/tmp/home/root#
复制代码
帮我看看什么问题,我的目的是dnsmasq配合ipset,gfwlist清单的地址走ss代理,始终不成功
我的恩山、我的无线 The best wifi forum is right here.
发表于 2016-3-14 13:48 | 显示全部楼层
kmod-ipt-ipset装了?

点评

kob
[attachimg]126246[/attachimg] 已安装的模块  详情 回复 发表于 2016-3-14 14:46
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-3-14 13:48 | 显示全部楼层
好吧,这是TT板块,没用过,不知这个是否同样这个安装包名字。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2016-3-14 14:10 | 显示全部楼层
其实我是华硕RTN16刷的梅林固件
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2016-3-14 14:46 | 显示全部楼层
墨冥延 发表于 2016-3-14 13:48
kmod-ipt-ipset装了?


已安装的模块

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

点评

你这个TT我真不太懂。但在openwrt,还需要iptables-mod-nat-extra这个模块吧。你这个貌似没有。  详情 回复 发表于 2016-3-14 14:49
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-3-14 14:49 | 显示全部楼层

你这个TT我真不太懂。但在openwrt,还需要iptables-mod-nat-extra这个模块吧。你这个貌似没有。

点评

kob
还是谢谢了,我搞定了应该是这样的代码这样就可以了,我这个版本的iptables --match-set改为--set就搞定了  详情 回复 发表于 2016-3-15 10:25
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2016-3-15 10:25 | 显示全部楼层
墨冥延 发表于 2016-3-14 14:49
你这个TT我真不太懂。但在openwrt,还需要iptables-mod-nat-extra这个模块吧。你这个貌似没有。

还是谢谢了,我搞定了应该是这样的代码
  1. ipset -N gfwlist iphash

  2. iptables -t nat -A PREROUTING -p tcp -m set --set gfwlist dst -j REDIRECT --to-port 1080
复制代码
这样就可以了,我这个版本的iptables  --match-set改为--set就搞定了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-19 09:26

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表