| # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| description "Start IxChariot Performance Endpoint" | |
| author "chromium-os-dev@chromium.org" | |
| # You start the Chariot Endpoint manually with 'start ixchariot-endpoint'. | |
| pre-start script | |
| # Don't change iptables if the endpoint file is not installed | |
| if [ ! -e /usr/local/Ixia/endpoint ]; then | |
| stop | |
| exit 0 | |
| fi | |
| # This lets the endpoint receive commands from the console. | |
| iptables -A INPUT -p tcp -m tcp --dport 10115 -j ACCEPT | |
| ip6tables -A INPUT -p tcp -m tcp --dport 10115 -j ACCEPT | |
| # This lets this endpoint accept traffic from another endpoint on port 10120. | |
| iptables -A INPUT -p tcp -m tcp --dport 10120 -j ACCEPT | |
| iptables -A INPUT -p udp -m udp --dport 10120 -j ACCEPT | |
| ip6tables -A INPUT -p tcp -m tcp --dport 10120 -j ACCEPT | |
| ip6tables -A INPUT -p udp -m udp --dport 10120 -j ACCEPT | |
| end script | |
| exec /usr/local/Ixia/endpoint |