How can I forward message from a specific log file like /www/myapp/log/test.log
with rsyslog
client to remote rsyslog
server? This log file is outside of the directory /var/log
.
Kevin Campion's questions
I follow this tutorial (http://www.linux-kvm.com/content/using-vmware-vga-kvm-windows-guests) to use Vmware VGA with KVM Windows Guests.
The vmware vga driver is installed on Windows, but I can't select "vmvga" into Proxmox's interface. I can just choose "default", "Standard VGA" and "Cirrus Logic GD5446".
I tried command "kvm" and "qm" but nothing.
I have one dedicaced server with its own IP and another IP (failover) who refer to the first.
I will wish to change the gateway of a Proxmox virtual machine (openvz) who runs on this dedicaced server to go through the failover IP rather than the ip of host main server.
Once connected to a virtual machine, when I do a traceroute
VE# traceroute www.google.fr
traceroute to www.google.fr (209.85.229.104), 30 hops max, 60 byte packets
1 MY_SERVER_NAME.ovh.net (xxx.xxx.xxx.xxx FIRST_IP_MAIN_SERVER) 0.021 ms 0.010 ms 0.009 ms
The first line tells me the ip of host main server. I would like that the traceroute display the second IP failover.
VE# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.0.2.1 * 255.255.255.255 UH 0 0 0 venet0
default 192.0.2.1 0.0.0.0 UG 0 0 0 venet0
With iptables
HOST# iptables -t nat -L
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere
MASQUERADE all -- anywhere anywhere
SNAT tcp -- anywhere 10.10.101.2 tcp dpt:www state NEW,RELATED,ESTABLISHED,UNTRACKED to:SECOND_IP_FAILOVER
SNAT all -- 10.10.101.2 anywhere to:SECOND_IP_FAILOVER
10.10.101.2 is the virtual machine IP (interface venet0)
Any ideas ?
I have 2 ip adresses on the Internet who redirect on the same machine. On this machine, one Debian runs on OpenVZ. I can set iptables rules to redirect all http request to the Debian.
iptables prerouting -d ip_address_2 DNAT --to ip_address_local_1
+--------------+
| |
| V
| 10.10.101.5
I| +------+ +----------+
N|ip_address_1 | |-----|Debian1 VE|-- Apache's log
T|-----------------|OpenVZ| +----------+ [client ip_address_1]
E| | | |
R|ip_address_2 | | |
N|--------------+ | |
E| +------+
T|
Iptables' rules :
iptables -t nat -A PREROUTING -p tcp -i eth0 -d ip_address_2 --dport 80 -j DNAT --to 10.10.101.5:80
iptables -A FORWARD -p tcp -i eth0 -o venet0 -d 10.10.101.5 --dport 80 -j ACCEPT
iptables -A FORWARD -p tcp -i venet0 -o eth0 -s 10.10.101.5 --sport 80 -j ACCEPT
When I go to webpage with "http://ip_address_2", I can see the good content but the ip address on access log file is ip_address_1, I would like to see my ISP's ip address.
If I type :
# iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- 0.0.0.0/0 ip_address_2 tcp dpt:80 to:10.10.101.5:80
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 0.0.0.0/0 0.0.0.0/0
SNAT all -- 10.10.101.5 0.0.0.0/0 to:ip_address_2
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Any ideas?
When I try to recover PostgreSQL database from a backup saved under my old version of Mac Os X 10.5 (32bits) on my new version 10.6 (64bits), I have this error :
# sudo -u postgres /opt/local/lib/postgresql82/bin/postgres -D defaultdb_backup
FATAL: incorrect checksum in control file
This was due to the one server running a 32 bit version and the other one running a 64 bit.
How do I recover my old data ?