Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have my own machine along private ip (LAN ip) 192.168.0.1 and public ip (WAN ip) IP 123.45.67.89 through PPPOE connection. So I wanted to access my own Apache server through my own public ip internally (223.145.167.189:80) but it is failed.

The problems are solved if I use Bridge-Mode connection or Virtual Server dsl router, but how if dsl router does not has Virtual Server and I still want to use PPPOE? Any solution?

Specs:

The 192.168.0.1 and 223.145.167.189 are hosted with the same Apache Server.
I use Aztech 605E anyway, which Virtual Server function is not implemented in this model.

This is the test result I have:

BRIDGE MODE

192.168.0.1:80 ACCESSIBLE
223.145.167.189:80 ACCESSIBLE

PPPOE MODE + Virtual Server

192.168.0.1:80 ACCESSIBLE
223.145.167.189:80 ACCESSIBLE

PPPOE MODE + Without Virtual Server

192.168.0.1:80 ACCESSIBLE
223.145.167.189:80 UNACCESSIBLE

So, how to solve the 223.145.167.189 is accessible with "PPPOE MODE + Without Virtual Server"? Any idea how? I appreciate for your kindness and helps....

P/s: In other word, I want to work not only with port 80, but also any other TCP ports that do not related with web server.

Edit: Forgot to mention that, I have 192.168.0.3 which supported iptables under CentOS 5.9. The DSL also has DMZ function and DMZ to 192.168.0.3. The Port Forwarding also are fully works and functions with the 192.168.0.1 and the 192.168.0.3.

I also have tried below codes in my iptables's 192.168.0.3 machine, but I still couldnt reach the server internally, unless from external connections.

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A PREROUTING -i eth+ -p tcp --dport 80 -j DNAT --to-destination 192.168.0.1:80
iptables -I FORWARD -p tcp -d 192.168.0.1 --dport 80 -j ACCEPT
share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.