bigip

iOS 12でF5 Accessに証明書をインポートしてVPN接続する方法

日本語の記事が少なくて解決するのに時間かかったので、せっかくなので共有。 概要 iPhoneをiOS12にアップデートしたらF5 Accessが証明書を認識しなくなって、ややハマっていた。 レビューを見ても、皆同じように証明書が使えないと書いていたので、 当初は…

big-ip irule でURL Routingしているときの謎の仕様

謎の仕様というかほぼbugかな。 前提 pool を2つ容易 pool pool1 default pool pool2 特定URLを処理するpool /hoge/ or /fuga/ からはじまるURL pool1、pool2 ともにcookie persistence を有効 virtual server default pool にはpool1 を適用 HTTP Profile …

BIG-IP iruleでクライアントがTLS 1.1以下でアクセスしたときに別poolに振り分ける

PCI-DSS 絡みとかでTLS 1.1 以下が徐々に閉鎖されていっているなか、あらかじめWebページで告知したとしてもやはり接続してくるクライアントは一定数いてそうなので救済策を考えて見た。 TLS のバージョンはCLIENTSSL_HANDSHAKE eventで SSL::cipher version…

big-ip route domain , partition 操作

route domain ping %のあとにroute domainのID # ping 192.168.0.1%1rdsh でid指定してそのroute domainのnetwork内のshellに移動する # rdsh 1 # ping 192.168.0.1 partition defualtは/Common # tmsh # cd /partition

big-ip irule memo

httpとhttpsのpoolをひとつのiruleで処理する 例えば example.com-http example.com-https のようなpoolがある場合CLIENT_ACCEPTEDではTCP::local_portでportが判別できるので when CLIENT_ACCEPTED { switch -exact [TCP::local_port] { 80 { set pool_serv…

big-ip Web Accelerationでcache

httpコンテンツcacheする場合、だいたいvarnishとかnginx、apacheでやるし、 最近だとCDNもあったりするので、機能としてあるのは知ってたけど使わなかった機能。とはいえ突発的なアクセスがきて、急に構成変更ができない場合にさくっとできるように調べて見…

big-ip rest api

https://devcentral.f5.com/d/icontrol-rest-user-guide-version-1150 jsonで返ってくるのでjqかなければpython -m json.tool を使うと見易い。 $ curl -s -k --user user:pass https://192.168.0.1/mgmt/tm/ | jq .URLはこの辺 /tm/net/ /tm/ltm/ /tm/secur…

big-ipで帯域制御 Bandwith ControllerとRate Shaping

Bandwith Controller https://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/tmos-implementations-11-5-0/9.html Bandwidth controllers のほうが最新機能のようなのでこっちのがいいかも Rate Shapingの後継機能のようで、共存はできない…

big-ip ipv6 nat memo

VirtualServerにipv6 Poolにはipv4で作成したものを割り当てた場合、 通信失敗にはならなくて、自動的にbig-ipのv4のaddressでnatされてserverに送信される (snat automapしたときと同じ)

big-ip virtualserverに適用しているdefaultのSNIを入れ替える

やや面倒?clientssl-foo: foo.example.com sni default clientssl-bar: bar.example.com これを virtualserver example.com-httpsに適用している状態で bar.example.com をsniのdefaultにしたい前提: virtualserverに設定する段階では 複数のclient sslprof…

Big-IPでsorry serverにredirectする

poolが全滅、あるいはconnectioin limitにひっかかった場合にsorryサーバにリダイレクトさせたい場合。 connection limit入れたい場合 sorryサーバにリダイレクトしたい時に接続数制限をする場合はPoolのconnection limitを設定する。VirtualServerでConnect…

big-ip apm IP Geolocation Match memo

EndPoint Security (Server-Side) - IP Geolocation Match手動で記述する場合こんなん expr { [mcget {session.user.ipgeolocation.country_code}] == "JP" || [mcget {session.user.ipgeolocation.country_code}] == "US"

BIG-IP IP Geolocationで地域判別

AFMやAPMで許可する場合にipではなく地域を使ってアクセス許可/拒否したいときにgeolocation使うけど、Databaseが古いと想定外の地域で判定されてしまう。どやって判定してるねん?と調べて辿り着いたのがここ https://support.f5.com/kb/en-us/solutions/pu…

big-ip APMのセッション数 取得

GUI Access Policy - Manage Sessions SNMP https://support.f5.com/kb/en-us/solutions/public/15000/000/sol15032.html 1.3.6.1.4.1.3375.2.6.1.4.3.0 F5-BIGIP-APM-MIB::apmAccessStatCurrentActiveSessions.0 = Counter64: 16ただ、手元の環境だとGUIのM…

big-ip ltm current connectionをsnmpで取る

昔諦めた気がしたけど、snmpwalk一覧眺めたらあっさり解決した。 virtualserver F5-BIGIP-LOCAL-MIB::ltmVirtualServStatClientCurConns .1.3.6.1.4.1.3375.2.2.10.2.3.1.12 pool F5-BIGIP-LOCAL-MIB::ltmPoolStatServerCurConns .1.3.6.1.4.1.3375.2.2.5.2.…

big-ip persistence match acrossメモ

virtualserverを跨って同一のnodeに振り分けたいときのpersistenceのoption cookieでmatch acrossする場合はbig-ipが発行するinsert cookieは使えない。 cookie hashが必要(webアプリケーション側で発行するcookie名を指定) Cookie Nameは PHPSESSIDなど。ア…

big-ip irule IP::local_addr

使う場所 (event) 次第で結果が変わる。 https://devcentral.f5.com/wiki/iRules.IP__local_addr.ashx clientside (CLIENT_ACCEPTED)の場合はdestination addr serverside (SERVER_CONNECTED)の場合はsource addr iruleのCLIENT_ACCEPTEDを使っているところ…

big-ip source nat part2

hogem.hatenablog.com 追記で書いたけど↑は任意のsourceからとあるStandardなVirtualServerへアクセスしたときのsource nat とはいえ結局はnatなので半分ぐらいかぶってる。 今回は宛先がVirtualServerではなくて、 特定のserverからbig-ipをdefault gateway…

big-ip でSSLクライアント認証&外部のOCSPレスポンダを使って証明書の失効を管理する

AskF5 | Manual Chapter: Configuring Remote SSL OCSP Authentication 参考:hogem.hatenablog.com URLはpoolではなく、直接指定しかできないから、真面目に使うならサーバ間でHAとかしないとダメ? と思ったけどvirtualserverのIP宛でも指定できたので、事…

Big-IP APM memo

参考: hogem.hatenablog.com www.f5networks.co.jp SSL - Client Profile 証明書によるクライアント認証を行いたい場合、 普通はclientssl profile でClient Authenticationにrequireにする。 かつ、OCSP レスポンダを使う場合はvirtualserverでAuthenticati…

big-ip irule でlog (syslog) 設定

https://devcentral.f5.com/wiki/iRules.log.ashx local (big-ip) log local0. "foobar"などとすると/var/log/ltm に出力される remote log 192.168.0.10 "foobar" log 192.168.0.11 local0.info "hogehoge"とするとremote にsyslog送信できるので、 特定の…

big-ip tmsh cli で設定

memo v11.5.1 ve版 v11からshow running-config one-line が使えるようになったのでその出力を見れば、だいたいわかる。 ただし、例えばjuniper srx, screenos の場合はset address ... のように"set"も出力されるけど bigipはcreate ltm node ... のように"…

big-ip でSNI (Server Name Indication)

SNI SSL/TLSの拡張仕様 HTTPS でのname baseのvirtualhostを利用するためのもの http://ja.wikipedia.org/wiki/Server_Name_Indication (ワイルドカード証明書/マルチドメイン証明書はまた別の話なのでここでは置いておく) # 従来 HTTPの場合はhostヘッダでv…

big-ip tmsh show running-config をterminal length 0 風(あるいはno-more)に表示する

big-ip tmsh show running-config と打つと(もしくはtmsh に入ってからrunning-config) # tmsh show running-config Display all 170 items? (y/n)と確認されるけど、ログ取得時などに毎回確認されるのがうっとうしい。cisco iosだと # terminal length 0 # …

big-ip source nat

https://support.f5.com/kb/en-us/solutions/public/6000/000/sol6017.html 追記 これは任意のsourceからとあるStandardなVirtualServerへアクセスしたときのsource natのお話です 追記おわり VirtualServer Source Address TranslationでAutoMap (floating …

bigip ssl ciphersuite 確認

# tmm --clientciphers DEFAULTSSLv3を除外した場合を見る場合はこんな感じ。 "!"をシェルが展開しないようにクォートしておく。 # tmm --clientciphers 'DEFAULT:!SSLv3'

big-ip ssl profile

https://support.f5.com/kb/en-us/solutions/public/13000/100/sol13163.html http://www.f5networks.co.jp/shared/pdf/Heartbleed-JP.pdf ssl profile Cipherによって2種類の処理モードがある 1. NATIVE - default - F5のtmos上に実装された処理モード - SS…

big-ip のMySQL root password をぶっこ抜く

いらんことするとサポート対象外になりそうだけど。検証用VE版なのでやりたい放題で。mysqlのroot passwordはおそらくbigip毎にrandomに設定される。 が、謎のmysqlのsh(mysqlはログ、APMのユーザ情報などが入っていて、クラスタ間で同期するシェル?) /usr/…

big-ip AFM さわりメモ

tmshのmodule名前はsecurity? show security ... list security ...defaultではcliではログみれない? https://devcentral.f5.com/questions/security-event-logs-local-locations ログの設定をカスタマイズしてsyslogに出すようにすれば良いとか? http://s…

big-ip v11.5以降でpool memberをdownと誤判定してしまうbug

https://devcentral.f5.com/questions/health-check-failing-tcp-54321-is-this-more-than-a-coincidence これにぶち当たりました。サーバ(pool member)は問題ないのに、たまにbig-ipから死んでると判断されて、ちょいちょいsnmptrap飛んできていた。だいぶ…