Le Sun, 30 Aug 2009 10:07:59 -0500, Allen Kistler a écritÂ*:
> xmen wrote:
>> eth0=net / eth1=LAN.
>>
>> I wanna use public ip (like 222.222.33.*) on local network interface. I
>> try
>>
>> bash# route add -net 222.222.33.0 netmask 255.255.255.0 dev eth1
>>
>> but dns take the top.
>>
>> Any ideas to force 222.222.33.0/24 ip dest to take only that interface
>> way and keeping internet?
>
> If it's a directly connected network, you'll need to define an address
> in that range to eth1.
>
> If it's not a directly connected network, you'll need to add the local
> gateway to the route command.
>
> As the other poster noted, be sure to update whatever config your distro
> uses to make the change permanent.
Here my conf:
Internet
I
I
________I_________
Public IP I
Provider box I
WAN: 192.168.1.1 I
_________________I
I
________I___________
WAN: 192.168.1.2 I -> ra0
PC I -----------> Next see my/etc/network/interface
LAN: 222.222.222.1 I -> eth0
___________________I
I
________I___________
IP: 222.222.222.33 I
Special MachiNE I --> I cant change its IP
___________________I
/etc/network/interface:
iface raO inet static WAN
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
iface eth0 ine static
address 222.222.222.1
netmask 255.255.255.0
gateway 192.168.1.2
Resolv.conf 208.67.222.222 & 208.67.220.220
I cant show you route -n, I'm home
but when I:
bash# route add -net 222.222.33.0 netmask 255.255.255.0 dev eth1
I ve 2 line like:
Destination Gateway Genmask Flags Metric Ref Use
Iface
222.222.222.0 0.0.0.0 255.255.255.0 U 10 0 0
eth0
222.222.222.0 0.0.0.0 255.255.255.0 U 10 0 0
eth0
|