LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-14-2005, 04:13 AM   #1
Charles Daniel
Member
 
Registered: Aug 2004
Location: Missouri City, Tx
Posts: 39

Rep: Reputation: 15
Help w/ SSL and IPTABLES


I'm runnning an http server and a SSL virtual host on the same machine. The OS is SuSE Linux 8.0. Here are my conditions

1) A Netopia 3500 series router handles the NAT for my network.

2) The router hands off requests to the HTTP server's external ip to 192.168.1.4:80

3) The router hands off requests to the SSL server's external ip to 192.168.1.5 (same machine).

I need to fashion a rule that will allow an HTTPS (SSL) server to be accessible from the web. As you can see the HTTPS server currently listens @ 192.168.1.5:443.

Thanks

CMD
 
Old 04-14-2005, 04:49 AM   #2
aqoliveira
Member
 
Registered: Dec 2001
Location: Portugal
Distribution: /Red Hat/Fedora/Solaris
Posts: 622

Rep: Reputation: 30
Howzit

iptables -A INPUT -i <interface> -p tcp -d <myip> --dport 443 -j ACCEPT

hope this is what u looking for

cheers
 
Old 04-14-2005, 07:38 AM   #3
Charles Daniel
Member
 
Registered: Aug 2004
Location: Missouri City, Tx
Posts: 39

Original Poster
Rep: Reputation: 15
I thought you would say that ....

That's exactly what I did. Unfortunately, the server times out when accessed.
via the www. So, let me emphasize a couple of points:

1) The HTTP server and the HTTPS server reside on the same Linux server
with the HTTPS being a virtual host run on Apache 2.0

2) They share a common interface. The server is not dual homed and
only has 1 NIC. Nevertheless the HTTPS server requires its own separate
interface. To accomplish this I have set up an aliased ip address as follows:

## ===================================================
# set up an aliased ip address for the secure.pctechnirvana.com
# SSL transaction server

/sbin/ifconfig eth0:0 192.168.1.5
/sbin/route add -host 192.168.1.5 dev eth0:0
## ===================================================

Here eth0 and eth0:0 actually point to the same device. This allows me to
fool the OS into thinking that there are two NICs. This allows me to run the
HTTP server on eth0 @192.168.1.4:80 and the HTTPS server on eth0:0
@192.168.1.5:443. Actually, both servers are sharing a single device.

This may not be relevant but I thought I'd mention it just in case.

My instinct tells me that I may be getting blocked by a previous rule from
the iptables. I'll strip the script down to the bare essentials and see if I
can get it to work by adding stuff back in incrementally.
If that fails then I'll post my script later. Will let you know how it turns out

Thanks CMD
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsFTPd - SSL connection and dynamic SSL ports toxoplasme Linux - Server 11 08-22-2008 10:50 PM
apache2 - ssl : connection via ssl interrupted ldp Linux - Software 0 10-02-2005 09:07 AM
Pls check my iptables to see if i can login into hotmail and other SSL sites! debloxie Linux - Networking 1 01-26-2004 09:33 AM
IPtables Log Analyzer from http://www.gege.org/iptables/ brainlego Linux - Software 0 08-11-2003 06:08 AM
My iptables script is /etc/sysconfig/iptables. How do i make this baby execute on boo ForumKid Linux - General 3 01-22-2002 07:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:36 PM.

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