I have debian 2.6.8-3-386, and recently I replaced my netgar router
with debian ipmasq & dnsmasq. Sharing Internet working fine but I have
problem with port forwarding. I try to forward ssh port to 192.168.0.9,
I went through different websites, different iptables rules, and so on,
but nothing work for me ... and I have no idea what else I can/should
try ... I have to mention that I'm beginner ... PLEASE HELP
My iptables configuration:
debian:/home# iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
LOG all -- 127.0.0.0/8 anywhere LOG level
warning
ACCEPT all -- anywhere 255.255.255.255
ACCEPT all -- 192.168.0.0/24 anywhere
ACCEPT !tcp -- anywhere BASE-ADDRESS.MCAST.NET/4
LOG all -- 192.168.0.0/24 anywhere LOG level
warning
ACCEPT all -- anywhere 255.255.255.255
ACCEPT all -- anywhere c-67-173-142-211.hsd1.il.net
ACCEPT all -- anywhere 255.255.255.255
LOG all -- anywhere anywhere LOG level
warning
Chain FORWARD (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere state
RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere state NEW
ACCEPT tcp -- anywhere 192.168.0.9 tcp
dpt:ssh state NEW
ACCEPT tcp -- anywhere anywhere tcp
dpt:ssh
Chain OUTPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere 255.255.255.255
ACCEPT all -- anywhere 192.168.0.0/24
ACCEPT !tcp -- anywhere BASE-ADDRESS.MCAST.NET/4
LOG all -- anywhere 192.168.0.0/24 LOG level
warning
ACCEPT all -- anywhere 255.255.255.255
ACCEPT all -- c-67-173-142-211.hsd1.il.net anywhere
ACCEPT all -- 255.255.255.255 anywhere
LOG all -- anywhere anywhere LOG level
warning
debian:/home# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- anywhere anywhere tcp
dpt:ssh to:192.168.0.9
DNAT tcp -- anywhere anywhere tcp
dpt:ssh to:192.168.0.9:22
ACCEPT all -- anywhere anywhere
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
debian:/home#
thx...Bartek
|