[英]How to access Seafile server in a virtual machine through IPtables?
I have installed Seafile-server 3.0.4 64bit
on a Ubuntu-server 14.04
with default ports settings ( ie 8000
, 8082
, 10001
, 12001
) but fail to access the instance with the client. 我已经安装了Seafile服务器
3.0.4 64bit
Ubuntu的服务器上14.04
的默认端口设置( 即 8000
, 8082
, 10001
, 12001
),但无法与客户端访问实例。
The Ubuntu-server
is running as a KVM machine on a Gentoo
host. Ubuntu-server
在Gentoo
主机上作为KVM计算机运行。
After some time I add the following Iptables
rules to the host machine ( gentoo
), that seems to match the Seafile
's requirements: 一段时间后,我将以下
Iptables
规则添加到主机( gentoo
),该规则似乎符合Seafile
的要求:
#Iptables-Rules for Seafile
iptables -A INPUT -p tcp -m multiport --dports 8000,8082,10001,12001 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A output -p tcp -m multiport --sports 8000,8082,10001,12001 -m state --state ESTABLISHED -j ACCEPT
However I'm still unable to connect even with telnet
to the seafile-server either from Internet or the host machine. 但是,即使是
telnet
,我仍然无法从Internet或主机连接到seafile-server。
Update: issue might be related to fail2ban
更新:问题可能与
fail2ban
有关
As I'm using NAT to link my virtual machine to my host, I had to edit the rules as follow to get it to work: 当我使用NAT将虚拟机链接到主机时,我必须按如下所述编辑规则以使其正常工作:
#Iptables-Rules for Seafile
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 10001 -j DNAT --to 192.168.8.8:10001
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 12001 -j DNAT --to 192.168.8.8:12001
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.