From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <460D652B.4050106@stc.donpac.ru> Date: Fri, 30 Mar 2007 23:29:47 +0400 From: Eugene Prokopiev User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.2) Gecko/20040808 X-Accept-Language: ru-ru, ru MIME-Version: 1.0 To: Sysadmins@lists.altlinux.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit Subject: [Sysadmins] NAT inside VE X-BeenThere: sysadmins@lists.altlinux.org X-Mailman-Version: 2.1.9rc1 Precedence: list Reply-To: ALT Linux sysadmin discuss List-Id: ALT Linux sysadmin discuss List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2007 18:30:52 -0000 Archived-At: List-Archive: Здравствуйте! А можно ли использовать NAT внутри VE? В wiki.openvz.org не нашел, попробовал сделать в лоб: # iptables -t nat -A POSTROUTING -o eth2 -j SNAT --to-source 192.168.46.100 modprobe: Can't open dependencies file /lib/modules/2.6.16-ovz-smp-alt7/modules.dep (No such file or directory) iptables v1.3.5: can't initialize iptables table `nat': Incompatible with this kernel Perhaps iptables or your kernel needs to be upgraded. В HN: # cat /etc/vz/vz.conf ## Global parameters VIRTUOZZO=yes LOCKDIR=/var/lib/vz/lock DUMPDIR=/var/lib/vz/dump VE0CPUUNITS=1000 ## Logging parameters LOGGING=yes LOGFILE=/var/log/vzctl.log LOG_LEVEL=0 ## Disk quota parameters DISK_QUOTA=yes VZFASTBOOT=no # The name of the device whose ip address will be used as source ip for VE. # By default automatically assigned. #VE_ROUTE_SRC_DEV="eth0" ## Template parameters TEMPLATE=/var/lib/vz/template ## Defaults for VEs VE_ROOT=/var/lib/vz/root/$VEID VE_PRIVATE=/var/lib/vz/private/$VEID CONFIGFILE="vps.basic" DEF_OSTEMPLATE="altlinux-sisyphus" ## Load vzwdog module VZWDOG="no" IPV6="no" IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length" # lsmod Module Size Used by simfs 5468 4 vznetdev 16640 5 vzethdev 10120 0 vzrst 114964 0 ip_nat 18320 1 vzrst vzcpt 95908 0 ip_conntrack 58184 3 vzrst,ip_nat,vzcpt nfnetlink 7064 2 ip_nat,ip_conntrack vzdquota 37524 4 [permanent] vzmon 63300 8 vznetdev,vzethdev,vzrst,vzcpt md5 4864 1 ipv6 243296 19 vzrst,vzcpt,vzmon vzdev 4356 4 vznetdev,vzethdev,vzdquota,vzmon af_packet 23176 0 ipt_ttl 3328 4 ipt_TCPMSS 5632 4 iptable_mangle 5632 4 iptable_filter 5248 4 ipt_multiport 3968 8 ipt_tos 3072 4 ipt_REJECT 6656 4 ip_tables 15224 2 iptable_mangle,iptable_filter x_tables 17280 6 ipt_ttl,ipt_TCPMSS,ipt_multiport,ipt_tos,ipt_REJECT,ip_tables drbd 130272 4 bridge 49428 0 8139too 26880 0 mii 6272 1 8139too tg3 93316 0 dm_mod 52120 0 button 7440 0 rtc 13748 0 ext3 120840 3 jbd 58644 1 ext3 mbcache 9092 1 ext3 ips 43460 4 sd_mod 17408 5 scsi_mod 127496 2 ips,sd_mod ide_disk 16256 0 ide_generic 2176 0 [permanent] generic 5380 0 [permanent] piix 10500 0 [permanent] ide_core 117456 4 ide_disk,ide_generic,generic,piix Чего-нибудь не хватает или этого нельзя сделать? Ядро - 2.6.16-ovz-smp-alt7 -- С уважением, Прокопьев Евгений