LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-26-2012, 03:25 AM   #1
piyushsingh
LQ Newbie
 
Registered: Sep 2012
Posts: 21

Rep: Reputation: Disabled
apache server with static ip can be access globaly


PLEASE HELP ME...I AM IN BIG TROUBLE...
I HAVE CONFIGURED APACHE SERVER IN RHEL 6 THAT CAN BE ACCESSED LOCALY I HAVE ISP.MY STATIC IP IS 59.177.X.X AND MY LINUX MACHINE TAKES 192.168.1.3 ..I WANT TO MAKE AN APACHE SERVER THAT CAN BE ACCESS GLOBALY ..PLZZ HELP ME.I HAVE ALSO DONE THIS FOR PORT FORWARDING
'iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080'.AND I HAVE ALSO CHANGED IN /etc/httpd/conf/httpd.conf LISTEN 8080.
please help me guys i am in big trouble.my mind is not working now
 
Old 09-26-2012, 06:08 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,254

Rep: Reputation: 314Reputation: 314Reputation: 314Reputation: 314
You need to change destination IP on router (there where is access to this external IP), like that:
Code:
iptables -t nat -A PREROUTING -p tcp -d 59.177.X.X --dport 80 -j DNAT --to-destination 192.168.1.3:8080
Do not use REDIRECT target, it is for other purposes. If you have no access to router, therefore have no access to external IP, you can't publish your LAN servers. Then you can only talk with your provider to redirect for you one or more ports (but surely no 80), or buy your own public IP address.

P.S. Please do not use capital letters on whole post.

Last edited by eSelix; 09-26-2012 at 06:11 AM.
 
Old 09-26-2012, 06:25 AM   #3
piyushsingh
LQ Newbie
 
Registered: Sep 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Thanks lot sir..
sir as you said to purchase public ip.i have purchased ip and i mentioned it my static ip is of beetel450tc1 of mtnl.sir please tell me is there any configuration should i do with my beetel 450tc1 router.sir my apache server is accessible localy ..plz tell me the steps that i follow to make my apache server globaly..i will be greatfull to you sir...
please help me out this please
 
Old 09-26-2012, 07:17 AM   #4
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,254

Rep: Reputation: 314Reputation: 314Reputation: 314Reputation: 314
Sorry, I have no manual for your router. After login to router there should be somewhere option about NAT or port forwarding or port triggering. There you enter external port and your internal IP and port to redirect. Check this link about Port forwarding for Beetel 450TC1.
 
Old 09-26-2012, 07:49 AM   #5
piyushsingh
LQ Newbie
 
Registered: Sep 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Apache server with static ip

Thanks a lot sir..for showing your interest
sir in my router configuration there is port triggering .you just tell me that what port no should i write there '80' or '8080' as in /etc/httpd/conf/httpd.conf file i have changed it listen 8080...and any other things that i should do with httpd.conf please tell me...as i have told static ip is 59.177.x.x and my linux machine takes 192.168.1.3..please tell me all step that i should after compliting my apache server that is running localy to run it globaly.i mean tell me all step to make apache server run globaly ..please sir ..sorry for any mistakes
 
Old 09-27-2012, 05:20 AM   #6
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,254

Rep: Reputation: 314Reputation: 314Reputation: 314Reputation: 314
You only need forward port 80 on your router to PC where Apache is installed on proper port, that is: 192.168.1.3:8080. In port triggering you have to enter incomming port or port range (80), destination IP (192.168.1.3) and destination port or port range (8080) and probably any name for this rule. After changing httpd.conf options remember to restart Apache.
 
Old 09-28-2012, 07:17 AM   #7
piyushsingh
LQ Newbie
 
Registered: Sep 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
i have done all this ..again when i am trying to open http://59.177.x.x:8080 it is not openinig ..please help me .
when i check on portchecker it shows my static ip's 59.177.x.x port 80 is closed..please help me

Last edited by piyushsingh; 09-28-2012 at 07:18 AM.
 
Old 09-28-2012, 03:07 PM   #8
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,254

Rep: Reputation: 314Reputation: 314Reputation: 314Reputation: 314
Check on PC, where Apache is running if it really works with command
Code:
sudo netstat -4lnp | grep :80
Check if you get response on internal network by writing into browser address "http://192.168.1.3:8080/" Your external addres should be "http://59.177.x.x:80" not "http://59.177.x.x:8080". Check your firewall on server by "iptables -L".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Apache server with Static ip is not working piyushsingh Linux - Newbie 4 09-08-2012 10:04 AM
How can allow linux server in static ip should access by single dyanmic ipaadress sanjay87 Linux - Security 1 03-10-2012 07:03 AM
Unable to access the server with static IP narendravijayarao Ubuntu 20 10-02-2009 12:31 PM
Using Apache server with non-static IP address issue coldbeer Linux - Server 2 07-06-2007 09:09 AM
can't access ftp server outside my LAN, fc4, ipcop, and static IP dazaau Linux - Networking 5 03-19-2006 10:41 PM


All times are GMT -5. The time now is 07:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration