LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-18-2013, 05:17 PM   #16
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2

at first i do what is in this guide
http://freehostinganswers.com/blog/h...at-and-ubuntu/
 
Old 04-18-2013, 05:21 PM   #17
warez74
LQ Newbie
 
Registered: Apr 2013
Posts: 27

Rep: Reputation: 0
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)
 
Old 04-18-2013, 05:35 PM   #18
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2
now i cant access my server from my ip iam waiting softlayer to answer me why lol
 
Old 04-18-2013, 05:40 PM   #19
warez74
LQ Newbie
 
Registered: Apr 2013
Posts: 27

Rep: Reputation: 0
?

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?
 
Old 04-18-2013, 05:41 PM   #20
warez74
LQ Newbie
 
Registered: Apr 2013
Posts: 27

Rep: Reputation: 0
btw, I hope you did not set the public ip of your PC as a remoteip.
 
Old 04-18-2013, 05:46 PM   #21
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2
my laptop ip is x.4.252.69
my server ip is x.173.180.202
 
Old 04-18-2013, 05:48 PM   #22
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by warez74 View Post
btw, I hope you did not set the public ip of your PC as a remoteip.

hahaha i did that sorry i didnt understand this step very well
 
Old 04-18-2013, 05:50 PM   #23
warez74
LQ Newbie
 
Registered: Apr 2013
Posts: 27

Rep: Reputation: 0
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
 
Old 04-18-2013, 05:54 PM   #24
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2
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
 
Old 04-18-2013, 05:57 PM   #25
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2
how i can disconnect ppp0
??? vpn account connected to the server
 
Old 04-18-2013, 06:02 PM   #26
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2
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
 
Old 04-18-2013, 06:05 PM   #27
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2
you are my super man
i love you man
thanks alot
 
Old 04-18-2013, 06:07 PM   #28
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2
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 ?
 
Old 04-18-2013, 06:08 PM   #29
!! hack-back !!
Member
 
Registered: Nov 2009
Posts: 183

Original Poster
Rep: Reputation: 2
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
??
 
Old 04-18-2013, 06:09 PM   #30
warez74
LQ Newbie
 
Registered: Apr 2013
Posts: 27

Rep: Reputation: 0
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
 
  


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
PPTPD Server cheesewizz Linux - Newbie 1 11-23-2012 03:19 AM
PPTPD server on Linux andyflower Linux - Networking 4 10-07-2011 05:30 AM
PPTPD Server on Ubuntu newFreeBSD Linux - Server 1 05-17-2011 06:35 AM
issues with VPN pptpd server onorua Linux - Networking 1 08-25-2006 03:45 PM
pptpd server and pptp client on the same box - is this possible? acpi Linux - Networking 0 11-30-2005 09:09 AM

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

All times are GMT -5. The time now is 08:58 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
Open Source Consulting | Domain Registration