如何将oracle加入防火墙,防火墙里加入新端口的方法-iptable

Question1:

oracle-sun(290935297)  10:49:17

有人知道吗我想往 防火墙里面加入一个新的端口8081但是按着网上的加不进去。

None_N苇不航  10:51:37

iptables -I INPUT1 -p tcp --dport 80 -j ACCEPT

None_N苇不航  10:51:57

dport要指名协议

oracle-sun(290935297)  10:56:27

在问一下,用命令加入了怎么保存?

None_N苇不航  10:56:54

service iptables save

None_N苇不航  11:04:18

jump 下一个运作

as3-木头人(445498529)  11:04:32

--insert  -I chain [rulenum]

None_N苇不航  11:04:33

INPUT 是进入链,1是规则1

as3-木头人(445498529)  11:04:55

INPUT1是这次的规则名称

as3-木头人(445498529)  11:05:39

-j ACCEPT 是jump to ACCEPT

as3-木头人(445498529)  11:05:57

也就是说如果INPUT1 通过了, 就逃至ACCEPT的规则校验

as3-木头人(445498529)  11:06:55

iptables v1.2.11

Usage: iptables -[AD] chain rule-specification [options]

iptables -[RI] chain rulenum rule-specification [options]

iptables -D chain rulenum [options]

iptables -[LFZ] [chain] [options]

iptables -[NX] chain

iptables -E old-chain-name new-chain-name

iptables -P chain target [options]

iptables -h (print this help information)

Commands:

Either long or short options are allowed.

--append  -A chain            Append to chain

--delete  -D chain            Delete matching rule from chain

--delete  -D chain rulenum

Delete rule rulenum (1 = first) from chain

--insert  -I chain [rulenum]

Insert in chain as rulenum (default 1=first)

--replace -R chain rulenum

Replace rule rulenum (1 = first) in chain

--list    -L [chain]          List the rules in a chain or all chains

--flush   -F [chain]          Delete all rules in  chain or all chains

--zero    -Z [chain]          Zero counters in chain or all chains

--new     -N chain            Create a new user-defined chain

--delete-chain

-X [chain]          Delete a user-defined chain

--policy  -P chain target

Change policy on chain to target

--rename-chain

-E old-chain new-chain

Change chain name, (moving any references)

Options:

--proto       -p [!] proto    protocol: by number or name, eg. `tcp'

--source      -s [!] address[/mask]

source specification

--destination -d [!] address[/mask]

destination specification

--in-interface -i [!] input name[+]

network interface name ([+] for wildcard)

--jump        -j target

target for rule (may load target extension)

--match       -m match

extended match (may load extension)

--numeric     -n              numeric output of addresses and ports

--out-interface -o [!] output name[+]

network interface name ([+] for wildcard)

--table       -t table        table to manipulate (default: `filter')

--verbose     -v              verbose mode

--line-numbers                print line numbers when listing

--exact       -x              expand numbers (display exact values)

[!] --fragment  -f              match second or further fragments only

--modprobe=          try to insert modules using this command

--set-counters PKTS BYTES     set the counter during insert/append

[!] --version   -V              print package version.

perl_小新(147551562)  11:07:54

介意我把你们的QQ号写到我blog里吗

perl_小新(147551562)  11:07:59

默认表示不介意

---as3-木头人(445498529)  11:08:26

不介意

---None_N苇不航  11:13:29

完全介意

Question2:

oracle-sun(290935297)  11:17:50

为什么我在命令行里面删除了在保存从新启动了,还是在这里能看见

perl_小新(147551562)  11:18:12

咋删的?- -

perl_小新(147551562)  11:18:18

没听说你要删除

oracle-sun(290935297)  11:18:23

oracle-sun(290935297)  11:18:38

iptables -D RH-Firewall-1-INPUT -m state --state NEW  -p tcp --dport 8081 -j ACCEPT

oracle-sun(290935297)  11:18:53

然后service iptables save

oracle-sun(290935297)  11:19:00

service iptables restart

perl_小新(147551562)  11:19:10

为啥你不直接用右侧的添加和删除呢

oracle-sun(290935297)  11:19:30

因为要远程一个

None_N苇不航  11:19:12

iptables -L 看一下

oracle-sun(290935297)  11:19:48

iptables -L的看不见了

oracle-sun(290935297)  11:20:02

但是图形下看得见

None_N苇不航  11:20:52

。。。。

oracle-sun(290935297)  11:21:21

oracle-sun(290935297)  11:21:38

oracle-sun(290935297)  11:21:49

怎么都不同步

oracle-sun(290935297)  11:22:06

还是我的命令有问题?

None_N苇不航  11:22:31

你是不是把那窗口关了再开次啊

oracle-sun(290935297)  11:22:46

是的

oracle-sun(290935297)  11:24:46

而且我加入的在上面

oracle-sun(290935297)  11:25:08

就是那个 tcp dpt:tproxy

oracle-sun(290935297)  11:24:57

oracle-sun(290935297)  11:25:12

那行

oracle-sun(290935297)  11:25:22

他加入的在倒数第二行

oracle-sun(290935297)  11:25:35

就是

上面

None_N苇不航  11:33:41

你是说你删除了,图形下还有对么

oracle-sun(290935297)  11:33:52

对的

oracle-sun(290935297)  11:34:18

刚才无意中发现的。另外一个机房在300多公里以外。现在不知道怎么弄了

None_N苇不航  11:34:46

图形下的关了再开呢

oracle-sun(290935297)  11:34:55

一样的

oracle-sun(290935297)  11:35:22

我已经弄过了。图形的配置可以同步过来。命令行的配置同步不过去

oracle-sun(290935297)  11:35:34

iptables -I RH-Firewall-1-INPUT -m state --state NEW  -p tcp --dport 8081 -j ACCEPT

oracle-sun(290935297)  11:35:42

我是用这个命令加的

None_N苇不航  11:36:09

。。。I的位置在哪

None_N苇不航  11:36:14

默认加在最后哦

Shell_un(38un.com)(270777526)  11:37:48

把iptable写在一个脚本文件  然后在开机启动脚本里 加入这个脚本

oracle-sun(290935297)  11:38:32

好的

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值