LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-14-2011, 04:52 AM   #1
roshan.s
LQ Newbie
 
Registered: Apr 2011
Posts: 12

Rep: Reputation: 0
Port redirect 8443 to 443


Hi Advance thanks,

I am facing the last 7 days to port redirect 8443 to 443(default port)
but i could not able to redirect,please help me this issue it is very importent to solve

Here are the iptables rulls which i have setted up in linux machine

# Generated by iptables-save v1.4.7 on Thu Jul 14 09:33:54 2011
*filter
:INPUT ACCEPT [76547:220544258]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [62284:205568831]
COMMIT
# Completed on Thu Jul 14 09:33:54 2011
# Generated by iptables-save v1.4.7 on Thu Jul 14 09:33:54 2011
*nat
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [3:267]
:POSTROUTING ACCEPT [3:267]
-A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
-A PREROUTING -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443
-A PREROUTING -d 127.0.0.1/32 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443
-A PREROUTING -d 10.168.61.237/32 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443
-A OUTPUT -d 10.168.61.237/32 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443
COMMIT
# Completed on Thu Jul 14 09:33:54 2011
/etc/sysconfig/iptables (END)

But the thing is i can able to redirected to 8080 to 80 but
i could not able access like https://localhost insted of https://localhost:8443

hope i will get answer from duddes...

Thanks,
Roshan MS.
 
Old 07-14-2011, 03:57 PM   #2
opnsrc
LQ Newbie
 
Registered: Dec 2005
Posts: 28

Rep: Reputation: 1
I don't think your problem is one of redirect, I think it's of the listening service. By default, ssl listens on 443, if you want it 8443. Not sure which Linux flavor you're using, but look for ssl.conf (ie: /etc/httpd/conf.d/ssl.conf).

This will give you a list of currently *listening* services:

netstat -ntap |grep -i listen
 
Old 07-14-2011, 07:37 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
In addition to the above
Code:
-A PREROUTING -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443
-A PREROUTING -d 127.0.0.1/32 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443
-A PREROUTING -d 10.168.61.237/32 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443
the first rule there makes the next 2 redundant (iptables does first match).
Also, your request is
Quote:
redirect 8443 to 443
but your rules redirect 443 to 8443 (opposite direction ) ... which is it?

Are you really sure you want
Code:
-A OUTPUT -d 10.168.61.237/32 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443
that's for pkts leaving your system to go to another system (usually...)
 
Old 07-15-2011, 01:31 AM   #4
roshan.s
LQ Newbie
 
Registered: Apr 2011
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for your reply

I am using EC2-Amazon Linux Server with sudo privileges, actuaily i want to be EX: https://www.roshan.com like do not want to be https://www.roshan.com:8443 why means i have configured server.xml conf. file for https:8443 so give me suggestion to above links which can not show the link with PORT number

SO please help out in this issue.Hope i will get reply from You ASAP.

Last edited by roshan.s; 07-15-2011 at 01:40 AM.
 
Old 07-15-2011, 01:40 AM   #5
roshan.s
LQ Newbie
 
Registered: Apr 2011
Posts: 12

Original Poster
Rep: Reputation: 0
I am using
Ec2 Amazon Linux Server
 
  


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
PLESK [Solution] Change port to 23 (telnet) instead of default port 8443 x5452 Linux - Software 6 05-10-2009 05:58 AM
cannot acees to webserver port 8443 in LAN via squid cccc Linux - Server 2 01-31-2009 12:43 PM
redirect some http requests to port 443. FMH Linux - Software 5 09-17-2007 08:19 AM
tomcat don't listen on port 8443 (ssl) Kanaflloric Linux - Software 2 05-03-2007 05:41 AM
apache redirect from 80 to 443 gabsik Linux - Networking 31 06-18-2006 06:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:21 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