View Full Version : Editing IP in webpost
I have a singular problem with Webpost, I actually run a TS server and Web server in my own PC, which is behind NAT. The connection from internet to both is possible and no problem. But the question is coming.... XD
If in webpost I use the data from SQL, the 127.0.0.1 appears in webpost and nobody can connect from internet using it.
I've tried to change this IP to the external (internet IP of my router), I get that, then the external IP appears correctly and the users can connect using webpost now!!! But what?? NO!!! I obtain this message: "Data unavailable.TCPQueryPort may not be open" and no info channels appear.
This is clear for me.. webpost is trying to connect from external to the TS server (imposible is in LAN) but how to correct all that??
I'd like to show the correct IP (external) and the info channels, but how??
Thanks in advance and excuse my poor English XD.. Muadib
Have you opened the TCPQueryPort port (51234 by default) in your router just has you have for the 8786 port?
Originally posted by Gryphon
Have you opened the TCPQueryPort port (51234 by default) in your router just has you have for the 8786 port?
Cause the external IP is not reachable from intranet (LAN), it means that if I try to connect with my server only I can use the internal IPs. This is my question...
How modify webpost to show external IP for users who connect from Internet, and while webpost use the internal IP (LAN) to reach TCPquery, and show info channels and more??
Try this on http://80.24.65.44/webpost/
Thanks again. Muadib
Don't think you can get it to show the external ip and yet tcpquery from the internal ip without some hacking.
What would be easiest (for me :p) is for you to set your webpost to the external ip and open the 51234 port just as you have with the 8786 ports.
Hope that helps :(
Originally posted by Gryphon
Don't think you can get it to show the external ip and yet tcpquery from the internal ip without some hacking.
What would be easiest (for me :p) is for you to set your webpost to the external ip and open the 51234 port just as you have with the 8786 ports.
Hope that helps :(
Perhaps I didn't explain well. My PC is behind router, which refuse incoming request from LAN to the external IP, this means... only with Internal IP of router my PC communicates, impossible using the external. :(
Thanks.. don't worry. Muadib
[SOB]Grunt
14-11-2002, 23:51
That just doesn't make sense. If your router uses NAT translation, then the outside ip address for every computer on the network is the same, the router just sends the packets to the right destination.
If somebody connects properly to your teamspeak server, I don't see how the webpost script on a website can't communicate with the server. The basic premise is the same, just a different port.
OK... let's try last once.....
I read very manuals for one year ago, when I suscribe to DSL service. These manuals were to config my router and how it is works. After more lost hours reading and headhaches, I understood (and I think I've not wrong) that the NAT (NAPT) only accept inbound request for internet to the external IP, the test to know that is to load a webserver in my machine, I use IE :( and when I put the IP of localhost no problem XDD is in which I stand. But if I proof with external IP (router public, not LAN) the IE is showing message Web page not found. And this is real!!!!
Summary: perhaps I don't explain well (sorry for my poor english) but perhaps nobody, has the same problem and try to fix it. For that I suppose that only people with the NAPT or know how works it, can respond me in this simple problem.
I'm still thinking that I must to change some in webpost code (like now), but someone can send me any other idea.
Thanks a everyone, specially to Gryphon and [SOB]Grunt.
sorry for my english. Muadib
Seven_NL
15-11-2002, 14:00
I believe you have the same problem I encountered.
try the following in the webpost.php script:
Below the following lines....
$server_ip = getenv("HTTP_X_FORWARDED_FOR");
if ($server_ip == "") {
$server_ip = getenv("REMOTE_ADDR");
}
add....
if ($server_ip == "123.123.123.123") {
$server_ip = "456.456.456.456";
}
where 123.123.123.123 is the internet ip of your firewall
and 456.456.456.456 is your internet ip of your TS2 server.
I changed that several days ago.. and still doesn't work.
Thanks a lot for all.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.