at first i do what is in this guide
http://freehostinganswers.com/blog/h...at-and-ubuntu/ |
Add the following iptable rules:
iptables -t nat -A PREROUTING -d x.x.x.x -p tcp --dport 81 -j DNAT --to x.4.252.69 iptables -t nat -A PREROUTING -d x.x.x.x -p tcp --dport 3460 -j DNAT --to x.4.252.69 where x.x.x.x is IP address of your public server. (dont forget to change the "x" with proper number in the x.4.252.69) |
now i cant access my server from my ip iam waiting softlayer to answer me why lol :(
|
?
One thing... the localip and the remoteip (pptpd.conf) should be IP addresses from private range e.g.: localip 10.10.10.2 remoteip 10.10.10.1 Does that goes for your case? |
btw, I hope you did not set the public ip of your PC as a remoteip.
|
my laptop ip is x.4.252.69
my server ip is x.173.180.202 |
Quote:
hahaha i did that sorry i didnt understand this step very well :doh: |
Oh, no :(
You made a common mistake in pptpd.conf find the place in pptpd.conf where the localip/remoteip are specified and edit it to be like this: localip 10.10.10.2 remoteip 10.10.10.1 Then when you get access to your server again, add the following iptables rules: iptables -t nat -A PREROUTING -d x.173.180.202 -p tcp --dport 81 -j DNAT --to 10.10.10.1 iptables -t nat -A PREROUTING -d x.173.180.202 -p tcp --dport 3460 -j DNAT --to 10.10.10.1 |
ok i edited thanks
i can access it through free vpn but i cant access from my ip i dont know why but i put ticket for softlayer.com waiting them to finish so that i can test with these rules |
how i can disconnect ppp0
??? vpn account connected to the server |
i solved the problem /etc/init.d/pptpd restart-kill
that because i put my ip in remote ip lol the softlayer still searching for the problem :P |
you are my super man :D
i love you man :D :hattip: thanks alot |
if i make more than 1 vpn account
all of them will take 10.10.10.1 so that i can put remoteip 10.10.10.1-200 right ? |
and in iptables
iptables -t nat -A PREROUTING -d 184.173.180.202 -p tcp --dport 82 -j DNAT --to 10.10.10.1-200 ?? |
No, wait.
You can remove the last added iptables rules. First enter this: iptables -t nat -L --line-numbers you should get something like this: Chain PREROUTING (policy ACCEPT) num target prot opt source destination 1 DNAT tcp -- anywhere landings.nyc.trafficz.com tcp dpt:81 to:10.10.10.1 Notify "1" under below the "num" field. You should use that rule number (in your case it can be different) to delete the previous added rules: Then enter: iptables -t nat -D PREROUTING 1 where "1" is the number that you found for "destination" x.173.180.202 |
All times are GMT -5. The time now is 11:08 PM. |