Hello,
I am wondering if it is possible to implement a kind of port triggering
( http://en.wikipedia.org/wiki/Port_triggering ) in OpenBSD.
My problem is :
Free is a French Internet provider and one of is service is to give
television acces on the PC using VLC ( http://www.videolan.org/ ),
but for this to work we need to setup Redirection on the Firewall
and the service will only work on one PC, that's why I am wondering if
it is possible to
implement a kind of port Triggering on the Firewall.
Following is the rule I have implemented for the service to work on my PC.
Thank's in advance for your answer.
# macros
#
ext_if = "sis0"
int_if = "sis1"
free_lan_host = "192.168.1.39"
free_net_host = "x.y.z.t"
free_dst_tcp_ports = "{ 8080 }"
free_dst_udp_ports = "{ 1618, 1620 }"
free_src_udp_ports = "{ 1619, 1621 }"
# nat private network to single routable address
#
nat on $ext_if inet from 192.168.1.0/24 to any -> ($ext_if) static-port
# Re-Direct for free player
#
rdr on $ext_if inet proto udp from any to any port $free_dst_udp_ports
-> $free_lan_host
rdr on $ext_if inet proto tcp from any to any port $free_dst_tcp_ports
-> $free_lan_host
# UDP
#
pass out on $ext_if inet proto udp from $ext_if to $free_net_host port
1234 keep state
pass out on $ext_if inet proto udp from $ext_if port $free_src_udp_ports
to $free_net_host keep state
pass in on $ext_if inet proto udp from $free_net_host to $free_lan_host
port $free_dst_udp_ports keep state
# TCP
#
pass out on $ext_if inet proto tcp from $ext_if to any port rtsp flags
S/SA keep state
pass out on $ext_if inet proto tcp from $ext_if to any port www flags
S/SA keep state
pass in on $ext_if proto tcp from $free_net_host to $free_lan_host port
$free_dst_tcp_ports flags S/SA keep state