Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

when I do

curl --insecure https://localhost/svn

from my linux box I can see that it is returning some data

However, when I run curl on this machine from another machine on the same network e.g.

curl --insecure https://<serverip>/svn

I get an error curl: (7) couldn't connect to host

Even though I can run other things like curl http://<serverip>:8080/ or curl http://<serverip>:9090/

Is there something I can do with iptables to make this work or something else?

Here is what my iptables looks like:

# iptables -L -n --line-numbers
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
4    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 
5    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:8080 /* Tomcat Server port */ 
6    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:9090 /* Tomcat Server port */ 
7    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination         
1    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination         
share|improve this question
    
If you keep deleting your questions you'll end up being auto banned. –  Iain Oct 9 '13 at 19:13

2 Answers 2

Open port 443 which is the default for https

iptables -I INPUT -p tcp -m tcp --dport 443 -j ACCEPT

Note -I is important. If that works use

service iptables save

to update /etc/sysconfig/iptables.

share|improve this answer

Sometimes selinux may block curl requests. You should check your selinux configuration that it is in permissive mode or disabled.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.