Код: Выделить всё
WAN=rl0
LAN=gem0
INET=tun0
DC="30001"
TOR="30002"
LANIP1="192.168.1.2"
set skip on lo0
set skip on $LAN
nat pass on $WAN inet from any -> $WAN
nat pass on $INET inet from any -> $INET
nat pass on $LAN inet from any -> $LAN
rdr pass on $WAN proto { tcp, udp } from any to any port { $DC, $TOR } -> { $LANIP1 }
rdr pass on $INET proto { tcp, udp } from any to any port { $DC, $TOR} -> { $LANIP1 }
pass out quick on $WAN inet all keep state
pass out quick on $INET inet all keep state
Запускаю АйсКаст север
Код: Выделить всё
icecast -b -c /etc/icecast.xml
Код: Выделить всё
ices -c /etc/ices.conf.orig -D /home/mpd -F /home/mpd/playlist.txt &
Конфиги:
ices.conf
Код: Выделить всё
<?xml version="1.0"?>
<ices:Configuration xmlns:ices="http://www.icecast.org/projects/ices">
<Playlist>
<File>playlist.txt</File>
<Randomize>1</Randomize>
<Type>builtin</Type>
<Module>ices</Module>
</Playlist>
<Execution>
<Background>0</Background>
<Verbose>0</Verbose>
<BaseDirectory>/tmp</BaseDirectory>
</Execution>
<Stream>
<Server>
<Hostname>localhost</Hostname>
<Port>8000</Port>
<Password>noidea</Password>
<Protocol>http</Protocol>
</Server>
<Mountpoint>/koug.ogg</Mountpoint>
<!-- The name of the dumpfile on the server for your stream. DO NOT set
this unless you know what you're doing.
<Dumpfile>ices.dump</Dumpfile>
-->
<Name>Default stream</Name>
<Genre>Default genre</Genre>
<Description>Default description</Description>
<URL>http://localhost/</URL>
<Public>0</Public>
<Bitrate>128</Bitrate>
<Reencode>0</Reencode>
<Channels>2</Channels>
</Stream>
</ices:Configuration>
Код: Выделить всё
<icecast>
<limits>
<sources>2</sources>
</limits>
<authentication>
<source-password>noidea</source-password>
<relay-password>noidea</relay-password>
<admin-user>admin</admin-user>
<admin-password>noidea</admin-password>
</authentication>
<!-- <hostname>localhost</hostname> -->
<listen-socket>
<port>8000</port>
</listen-socket>
<paths>
<logdir>/var/icecast/logs</logdir >
<webroot>/var/icecast/web</webroot>
<adminroot>/var/icecast/admin</adminroot>
<alias source="/" dest="/status.xsl"/>
</paths>
<security>
<changeowner>
<user>_icecast</user>
<group>_icecast</group>
</changeowner>
</security>
<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<loglevel>3</loglevel>
</logging>
</icecast>