LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices



Reply
 
Search this Thread
Old 12-01-2001, 03:34 AM   #1
Ratclaws
Member
 
Registered: Sep 2001
Location: New York
Distribution: Slackware 8
Posts: 100

Rep: Reputation: 16
ipchains port forwarding


already got ipchans to act as a router.

i wanted to forward a single port, so that i can do stuff like ftp to a computer on the local network, or run vnc.

i took a few wild guess at this.. can anyone help me out
(i do not want to use iptables or ipwadfm)

ipchains -I forward -s 216.179.55.555 -d 192.168.1.2 5900/5900 -j MASQ

ipchains -I forward --sport 216.179.999.999 5900:5900 -d 192.168.1.2 5900:5900 -j MASQ


ipchains -A forward -p tcp --sport 216.179.555.55 5900:5900 -p tcp --dport 192.168.1.2 5900:59000 -j MASQ

of course none of these woked for me.

if anyone can show me how to do this, please do
 
Old 12-02-2001, 11:26 PM   #2
dangel
Member
 
Registered: Nov 2001
Location: atl
Distribution: redhat
Posts: 52

Rep: Reputation: 15
you need to get ipmasqadm

and then do this:

ipmasqadm portfw -A -P tcp -L $IPADDR 80 -R $IPADDR 80
 
Old 12-04-2001, 04:59 AM   #3
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
Just to build on dangel's comment.

ipchains doesn't do reversed port forwarding through network address translation.
iptables will do this as part of the new MASQ requirements for 2.4 Kernels.

For more info on what's needed for Linux 2.0 & 2.2 Kernels read this:
http://www.linuxports.com/howto/IP-MASQ/x1525.htm

The correct syntax is with a lower case "-a"
Also install the module as Linux 2.x doesn't use a Monolithic Kernel.

example:
modprobe ip_masq_portfw
ipmasqadm portfw -a -P tcp -L 210.40.16.14 80 -R 10.0.21.2 80

What does it all mean:
ipmasqadm = ipmasq admin
portfw = internal port forward option
-a = add
-P = Protocol type
-L = source address port number
-R redirect address port number


/Raz
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 08:35 PM
ipchains forwarding rules scheidel21 Linux - Networking 0 01-20-2004 08:37 AM
IPChains/IPMasqadm Port Forwarding Sonicsone Linux - Networking 8 12-03-2002 02:18 PM
IPChains + port forwarding + redhat 7.2 purduephotog Linux - Networking 2 04-22-2002 05:38 PM
Ipchains port forwarding localy yogee Linux - Networking 7 07-16-2001 12:41 PM


All times are GMT -5. The time now is 11:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration