Re: Simple question - opening a port
Re: Simple question - opening a port:
% Hi. I have debian 3.0 running ipmasq and iptables. It's a firewall
% for a home network. I want to host a game over the net. All I think
% I need to do is open a port for this. I don't quite know how to do
% that! Anyone have a pointer to a simple faq for this (or could just
% tell me!)
%
---akhir kutipan---
I have an experience today, opening port 80/www for one of my
inside-firewal machine. All I have to do is:
# iptables -t nat -A PREROUTING -i eth0 -p tcp
-d xxx.xxx.xxx.176 --dport www -j DNAT
--to 192.168.1.3:80
# iptables -A FORWARD -i eth0 -o eth1 -p tcp -d 192.168.1.3
--dport 80 -j ACCEPT
# iptables -A INPUT -i eth0 -m state --state
NEW,ESTABLISHED,RELATED -p tcp --dport www -j ACCEPT
note: xxx.*.176 is my ADSL-given IP (public).
The first two command is explained in
http://www.knowplace.org/netfilter/syntax.html#conf2
for port forwarding.
The lattest command is provided by G Wheelbarger in previous
message for opening the port.
0 Comments:
Post a Comment
<< Home