LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-28-2017, 03:48 PM   #16
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625

Think you are getting correct help so far.

All I got is Centos 6 doesn't work Centos 7 works. You said disable iptables and 6 works.

Assuming you have configured request correctly. https://www.gnu.org/software/wget/ma...9-Options.html

If you can't fix your iptables then consider either an online tester or program like FWbuilder to fix what you have. As far as I can tell from thread you have a firewall issue.

I guess while tables are off you could monitor the traffic to prove ports used maybe? Port 563 may be required for ssl? Dunno for sure.
This should have worked.
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT

May have to flush on changes. iptables -F
 
Old 09-29-2017, 10:32 AM   #17
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by jefro View Post
This should have worked.
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
That wouldn't have helped. OP is trying to go OUT not have something come IN. Possibly adding those rules to OUTPUT chain instead would work:
iptables -A OUTPUT -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --dport 443 -j ACCEPT

But the OP has a rather involved setup where he is first doing "DROP" rather than "ACCEPT" on the OUTPUT chain itself, His rules for 80,443 within the OUTPUT chain is jumping to a completely different (and customized) chain. Adding the 2 rules above to OUTPUT itself would possibly obviate what his jump rule is doing. Since I don't know why the setup there is cutomized as it is I'm loathe to suggest adding a rule anywhere than to the jump chain specified by the existing OUTPUT chain rule.

P.S. I'm not sure why you mentioned CentOS7. The OP says he is using CentOS6.2. If it WERE 7 instead he should use firewalld to configure rules as that is a front end for iptables on RHEL7/CentOS7. Directly editing iptables on 7 would likely cause issues because it is expected that only firewalld update iptables there. This isn't true of 6.2.
 
1 members found this post helpful.
Old 09-29-2017, 03:28 PM   #18
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
I only suggested trying the most simple rules to test. As you see their rules are not working correctly. A validator may help.

The OP said this. "Unfortunately the other server (CentOS 7)"
 
Old 10-02-2017, 04:33 PM   #19
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 116

Original Poster
Rep: Reputation: 7
Hi Guys,

Yeah, I think only mentioned the CentOS 7 machine in the context of demonstrating that the sites I was trying to access were working properly, and the fact that (at the time) I didn't think I could compare iptables set-up with that of firewalld.

Anyway, after much debate (inside my head), and still not really understanding why it is that the chain wasn't working, even though it seems set up okay, I decided to try the following (which, I'm sure, is still not the best way, but I just need something to work):
Code:
iptables -I OUTPUT -p tcp -m tcp --dport 443 -j ACCEPT
Note, prior to this I already had made a back up of iptables in case I needed to revert, but it did actually work, and I can now make the requests I need. I believe, in order to retain this change on reboot, that I need to save the changes, which I did with:
Code:
# /etc/init.d/iptables save
Thank you very much for the assistance, most especially mensawater: your patience and knowledge were much appreciated!
 
1 members found this post helpful.
  


Reply

Tags
centos6, connection timeout



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] wget unable to establish SSL connect slackware 13.1 timsoft Slackware 8 04-19-2016 09:09 AM
Wget or Curl Issue ulto Linux - Newbie 5 09-17-2015 07:21 AM
wget doesn't fetch CSS in M$ Conditional Comments phptek Linux - Software 0 05-25-2009 11:37 PM
need help with apach virtual hosts ssl/non ssl sites danthach Linux - Networking 3 05-25-2006 06:40 AM
YOU for SUSE 9.1 - curl or wget? djc SUSE / openSUSE 1 02-15-2005 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration