简体   繁体   English

Java中对ipv6套接字的权限被拒绝

[英]Permission denied on ipv6 Socket in Java

I have a strange problem on ipv6 connection. 我在ipv6连接上有一个奇怪的问题。

I write down a simple client server in Java, it works perfectly in ipv4 but when I try to use it with an Ipv6 address I receive a "java.net.SocketException: Permission denied". 我用Java编写了一个简单的客户端服务器,它在ipv4中运行良好,但是当我尝试将其与Ipv6地址一起使用时,会收到“ java.net.SocketException:权限被拒绝”。

If I try to run on the same machine client and server it works with ipv4 and ipv6 as well so i think that is a OS problem. 如果我尝试在同一台计算机的客户端和服务器上运行,它也可以与ipv4和ipv6一起使用,因此我认为这是一个操作系统问题。

Some informations: 一些信息:

Ping6 works between machines Iptables is stopped Os is RedHat 6.2 Ping6在机器之间工作iptables已停止Os是RedHat 6.2

Any ideas? 有任何想法吗? Thanks 谢谢

Antonio 安东尼奥

I found the problem. 我发现了问题。 There are two firewalls running as default on RHEL. 在RHEL上,有两个默认运行的防火墙。 I simply shutted down the IPv6 iptables. 我只是关闭了IPv6 iptables。

service ip6tables stop 服务ip6tables停止

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM