/------------------------------ My host ------------------------------\
---{ internet } { 82.36.74.191-EstFixIP } --- [ 192.168.0.1-local gateway ] --- [ 192.168.0.198-FreeBSD Host ] --- jails --- [ 192.168.0.115 ] webjail
.........................................................................................................................................|---[ 192.168.0.120 ] DBjail
.........................................................................................................................................|--- [ 192.168.0.125 ] mailjail
Hello everyone,
I have a problem where when trying to install wordpress or Zabbix on the webserver jail, I cannot establish a connection to the Database..
Here his an example for zabbix:
I get
Could anyone help?
/etc/rc/conf
/etc/pf.conf
/usr/local/my.cnf
/var/db/mysql/mysqld.log
Thank you in advance
---{ internet } { 82.36.74.191-EstFixIP } --- [ 192.168.0.1-local gateway ] --- [ 192.168.0.198-FreeBSD Host ] --- jails --- [ 192.168.0.115 ] webjail
.........................................................................................................................................|---[ 192.168.0.120 ] DBjail
.........................................................................................................................................|--- [ 192.168.0.125 ] mailjail
Hello everyone,
I have a problem where when trying to install wordpress or Zabbix on the webserver jail, I cannot establish a connection to the Database..
Here his an example for zabbix:
Code:
Database type: MySQL
Database host: 192.168.0.120
Database port: 0 [0 - use default port]
Database name: zabbix
User: zabbix
password ********
Code:
Error connecting to database [Operation timed out]
/etc/rc/conf
Code:
### Network configuration
ifconfig_bge0="inet 192.168.0.198 netmask 255.255.255.0"
defaultrouter="192.168.0.1"
### internal network configuration Jail interface aliases
ifconfig_bge0_alias0="inet 192.168.0.115 netmask 255.255.255.0" # webjai
ifconfig_bge0_alias1="inet 192.168.0.120 netmask 255.255.255.0" # sqljail
ifconfig_bge0_alias2="inet 192.168.0.125 netmask 255.255.255.0" # mailjail
Code:
### jail IPs
webjail ="192.168.0.115"
sqljail ="192.168.0.120"
mailjail ="192.168.0.125"
### jail Ports
webports ="{ http,https,82 }"
sqlports ="{ 3306 }"
mailports ="{ 25 }"
### nat all jail traffis
nat on $ext_if from 192.168.0.0/24 to any -> ($ext_if)
### Translation
rdr on $ext_if proto tcp from any to $ext_if port $webports -> $webjail
rdr on $ext_if proto tcp from any to $ext_if port $sqlports -> $sqljail
rdr on $ext_if proto tcp from any to $ext_if port $mailports -> $mailjail
... More rule bellow
Code:
[mysqld]
innodb_file_per_table
port = 3306
bind-address=191.168.0.120
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
# Setting for utf8 encoding
character-set-server=utf8 # UTF-8
collation-server=utf8_general_ci # UTF-8
skip-character-set-client-handshake # UTF-8
#### MySQL Hardening ####
# Disable symlinks from database
skip-symbolic-links
# Disable unauthorized reading from local files
local-infile=0
# Enable logs in mysql server
log-error = /var/db/mysql/mysqld.log
slow-query-log-file = /var/db/mysql/mysql-slow.log
long_query_time = 5
# Disable TCP networking
skip-networking
# Set non default port
#port = 2913
# Stop database information gathering
skip-show-database
Code:
2014-02-25 12:41:09 3392 [Note] Plugin 'FEDERATED' is disabled.
2014-02-25 12:41:09 3392 [Note] InnoDB: The InnoDB memory heap is disabled
2014-02-25 12:41:09 3392 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-02-25 12:41:09 3392 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-02-25 12:41:09 3392 [Note] InnoDB: Not using CPU crc32 instructions
2014-02-25 12:41:09 3392 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-02-25 12:41:09 3392 [Note] InnoDB: Completed initialization of buffer pool
2014-02-25 12:41:09 3392 [Note] InnoDB: Highest supported file format is Barracuda.
2014-02-25 12:41:09 3392 [Note] InnoDB: 128 rollback segment(s) are active.
2014-02-25 12:41:09 3392 [Note] InnoDB: Waiting for purge to start
2014-02-25 12:41:09 3392 [Note] InnoDB: 5.6.15 started; log sequence number 13980849
2014-02-25 12:41:09 3392 [Note] Event Scheduler: Loaded 0 events
2014-02-25 12:41:09 3392 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.6.15' socket: '/tmp/mysql.sock' port: 0 Source distribution