Re: Handing out Public IPs

Kosztyu András <[email protected]>
Newsgroups gmane.network.poptop
Message-ID <004801cacf4a$397eeef0$ac7cccd0$@hu>
Another problem might be that in many cases in server hosting companies (or
the one who gives you the public ip) check MAC addresses and their changes,
and automatically ban if something wierd happens like in this case different
computers announce their MAC assigned to that IP too frequently. 
My solution was that every time ppp connects it runs a script. The important
part of this script is:
$IPTABLES -t nat -A PREROUTING -d $IP -j DNAT
--to-destination=$ifconfig_pool_remote_ip
$IPTABLES -t nat -A POSTROUTING -s $ifconfig_pool_remote_ip -j SNAT
--to-source=$IP
in which $IP is a public ip (assigned to eth0:n), $ifconfig_pool_remote_ip
is the one that ppp gave as internal address. 

Hope this helps...

Andras

-----Original Message-----
From: Charlie Brady [mailto:[email protected]] 
Sent: Monday, March 29, 2010 3:53 PM
To: Evan LeStrange
Cc: [email protected]
Subject: Re: [Poptop-server] Handing out Public IPs


On Mon, 29 Mar 2010, Evan LeStrange wrote:

> I'm trying to hand out public IPs to the clients but somehow I cannot get
it
> to work (I'm new to networking in general).

It's very unusual IMO to distribute public IPs to the clients. PPTP is a 
VPN technology, and "PN" stands for "Private Networking".

> Running ifconfig on the server results in the following:
> 
> eth0      Link encap:Ethernet  HWaddr 40:40:46:ff:6e:2d
>           inet addr:x73.x03.119.137  Bcast:x173.x03.119.255
> Mask:255.255.255.0
>           inet6 addr: fe80::4240:46ff:feff:6e2d/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:1558864 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:1203789 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:925299168 (882.4 MiB)  TX bytes:893886411 (852.4 MiB)
> 
> eth0:1    Link encap:Ethernet  HWaddr 40:40:46:ff:6e:2d
>           inet addr:x73.x03.119.166  Bcast:x173.x03.119.255
> Mask:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> 
> eth0:2    Link encap:Ethernet  HWaddr 40:40:46:ff:6e:2d
>           inet addr:x73.x03.119.167  Bcast:x173.x03.119.255
> Mask:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
...

> I'm using the default pptp-config with:
> 
> localip x73.x03.119.137
> remoteip x73.x03.119.166-167

Here you have x73.x03.119.166 and x73.x03.119.167 set up as local IP 
addresses on the server, and are also asking pptp to configure the remote 
clients with the same IP addresses. That is certain to interfere with 
routing.

--
Charlie


----------------------------------------------------------------------------
--
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Poptop-server mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/poptop-server


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.