All pastes #4265 Raw Edit

Unreal

public text v1 · immutable
#4265 ·published 2005-01-15 20:50 UTC
rendered paste body
echo 1 > /proc/sys/net/ipv4/ip_forward

/sbin/ifconfig lo 127.0.0.1

/sbin/ifconfig eth0 up
/sbin/ifconfig eth0 195.225.247.238  netmask 255.255.255.224 #Used for real access
/sbin/ifconfig eth0:0 195.225.247.57 netmask 255.255.255.224 #used for MASQUERADING

/sbin/ifconfig eth1 up
/sbin/ifconfig eth1 192.168.0.1	     #LAN access

/sbin/route add -net 127.0.0.0
/sbin/route add -net 195.225.247.0 dev eth0
/sbin/route add -net 192.168.0.0 dev eth1
/sbin/route add -host 195.225.247.238 gw 195.225.247.225 dev eth0
/sbin/route add -host 195.225.247.57 gw 195.225.247.33 dev eth0:0
####/sbin/route add default gw 195.225.247.225 # dev eth0

iptables -t nat -A POSTROUTING -i eth1 -o eth0:0 -j MASQUERADE

I have two network interfaces ,one for local LAN and another for Internet
(connected to a DSL modem).My goal is to use two ip addresses on eth0(inet) and 
one ip address on eth1(LAN).One of the IP addresses 195.225.247.238,will be 
used by my Apache server and the other 195.225.247.57 will be used for my local 
LAN(simple MASQUERADE NAT),they both have different gateways(195.225.247.238 
has 195.225.247.225 ) and (195.225.247.57 has 195.225.247.33 ).

This is my configuration is it correct?(i ask this because i have to have very 
little downtime on that LAN,so when i change servers downtime should be reduced 
to a minumum).

..Unreal