Networking Forums

Networking Forums > Computer Networking > Linux Networking > Small port forwarding problem

Reply
Thread Tools Display Modes

Small port forwarding problem

 
 
Craig Kadziolka
Guest
Posts: n/a

 
      04-14-2004, 08:07 PM
Hello,

I am having a small problem with my port forwarding setup on my
computer. I essentially want to forward incoming connections to my
linux server to a port on a local machine behind the server. I have read
that this is a quite common thing to do.

I was having some problems with getting that working, so i decided
to test the idea on my stand-alone machine, just using the local loopback.

I want to forward incomming connections to an arbitary port (say, 4444)
to port 23, which (according to my limited theory of the internet) should
mean
that I can get to my telnet service on my local machine via port 4444.

After reading several sources, I set about this task, but I cant seem to get
it working. My setup is this: Slackware 9.0 (a fresh install) with a 2.4
kernel.

My iptables command was this:

iptables -t nat -A PREROUTING -p tcp -j DNAT --dport 4444 --to-destination
127.0.0.1:23

I would really appreciate any help anyone could give me.

Following is attached some lists from iptables, route, ifconfig, and what
modules are loaded.

Thanks in advance,

Craig.

output from "iptables -L"

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

output from "iptables -L -t nat"


Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- anywhere anywhere tcp dpt:krb524
to:127.0.0.1:23

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
loopback * 255.0.0.0 U 0 0 0 lo

output from "ifconfig"

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:189 errors:0 dropped:0 overruns:0 frame:0
TX packets:189 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11227 (10.9 Kb) TX bytes:11227 (10.9 Kb)


modules loaded:
arp_tables 9132 0 (unused)
iptable_filter 1644 0 (autoclean) (unused)
iptable_nat 15928 1 (autoclean)
ip_conntrack 18120 1 (autoclean) [iptable_nat]
ip_tables 12288 4 [iptable_filter iptable_nat]
snd-pcm-oss 37252 0 (unused)
snd-mixer-oss 11992 0 [snd-pcm-oss]
printer 7040 0 (unused)
parport_pc 14724 0
parport 23264 0 [parport_pc]
uhci 24496 0 (unused)
usbcore 58400 1 [printer uhci]
snd-via82xx 11712 0
snd-pcm 55904 0 [snd-pcm-oss snd-via82xx]
snd-timer 13252 0 [snd-pcm]
snd-ac97-codec 37240 0 [snd-via82xx]
snd-page-alloc 6004 0 [snd-via82xx snd-pcm]
snd-mpu401-uart 3136 0 [snd-via82xx]
snd-rawmidi 12512 0 [snd-mpu401-uart]
snd-seq-device 3920 0 [snd-rawmidi]
snd 27460 0 [snd-pcm-oss snd-mixer-oss snd-via82xx
snd-pcm snd-timer snd-ac97-codec snd-mpu401-uart snd-rawmidi snd-seq-device]
soundcore 3332 3 [snd]
ide-scsi 9424 0
agpgart 39576 0 (unused)







 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
port forwarding problem zikester Windows Networking 1 04-28-2008 11:52 PM
Simple port forwarding problem jrpfinch Wireless Internet 7 11-27-2006 04:07 PM
NAT Problem Port Forwarding Kotowski Windows Networking 8 09-20-2005 05:52 PM
Yet another port forwarding problem (port80) GX Linux Networking 2 05-18-2004 06:17 AM
Port Forwarding problem Brian Peiris Windows Networking 3 01-26-2004 05:14 AM



1 2 3 4 5 6 7 8 9 10 11