Re: Router/linux question
Marco Paglioni wrote:
> Scenario:
>
> i have one router, and 8 static ip from my isp
>
> i want to assign to a linux machine behind the router, all avaiable public
> ip (knowing that one is for the net, one for the broadcast, one for the
> remote router and one for the wan interface on my router).
>
> The router is a Telindus 9100, but i need help on the logic of the
> configuration, not the real setup of the router.
>
> One of my friends told me that i have to assign another public ip to the
> LAN interface of the router.
> Then i can assign the remaining ip (3) to the linux machine.
>
> My problem is that the router does not seems to forward packet from the
> wan ip to the lan ip.
> I tried adding on free ip to one machine, setting the gateway to the lan
> ip of the router, and it seems that pinging the router lan ip works, but
> pinging an outside ip gives me network unreachable.
>
>
> What i'm doing wrong? Do i have to specify some type of forwarding/routing
> on the router?
>
> my ip are those:
>
> x.x.x.184 network
> x.x.x.185 remote router
> x.x.x.186 local router (wan)
> x.x.x.187 local router (lan)
> x.x.x.188 linux box
> x.x.x.189 linux box
> x.x.x.190 linux box
> x.x.x.191 broadcast
>
> if i give an ip of 192.168.x.x to the lan interface of the router, and to
> the linux bux, and activate NAT on the router, i'm able to ping
> everything...
> but i need to come from the outside into the linux box (it's one machine
> only at the moment, but may be they can become 3 separate computers)
>
>
> many thanks
>
> Marco
Hi,
if I was you, I would assign private IPs to the Linux boxes. Then do a
redirect.
For example, Linux box one has pubic IP 1.2.3.4 and the private IP
192.168.1.1 that you assigned to the box. Then do a destination NAT on the
Linux router:
iptables -t nat -A PREROUTING -d 1.2.3.4 -i interface_external -j DNAT
--to-destination 192.168.1.1
Alex
|