Solved

ipchains and ipmasqadm quickie

Posted on 2000-05-17
5
293 Views
Last Modified: 2013-12-15
Ok I have an ipchains firewall script that is called from the ip-up script (PPP connection). Within this ipchains script I wish to forward any ftp and telnet requests coming in to the ppp0 device to another machine within the ineternal  network - say 192.168.0.2

What I need to know is what is the rule I should use for ipchains, I have this so far...  (I don't have the script with me at the mo so I am trying to remember this from my head!!)....

<snip>
ipchains -A forward -p tcp -s $INTERNET -d $PPPIP telnet -j ACCEPT

#and the the ipmasqadm

<snip>
ipmasqadm portfw -a -P tcp -L $PPPIP 23 -R 192.168.0.12 23

is that right? Or does the ipchains -A command need to be forward and/or the -j command REDIRECT

The last bit is: Does packet forwarding just need to be on the gateway (PPP machine) or all computers within the internal network?

Cheers

Anewbis_
0
Comment
Question by:Anewbis_
  • 3
  • 2
5 Comments
 

Author Comment

by:Anewbis_
ID: 2818326
Ooops forgot a bit! on the ipchains rule can the -j option be DENY as it is going to get forwarded to another machine or would it have to be ACCEPT? I do not want anyone from outside to be able to telnet to the firewall box itself - hence the port redirection ;-)

Cheers
0
 

Accepted Solution

by:
liyang earned 50 total points
ID: 2851317
Assuming your internal machine can send packets out at will, and your firewall machine will ACCEPT (*not* FORWARD!) packets on port 23, then all you need is:

ipmasqadm portfw -a -P tcp -L $PPPIP 23 -R 192.168.0.12 23

hth
/Liyang
0
 

Author Comment

by:Anewbis_
ID: 2860165
Answer accepted
0
 

Author Comment

by:Anewbis_
ID: 2860166
Cheers! It works! Except FTP seems to hang on LIST/GET/DIR commands - any ideas on that?
0
 

Expert Comment

by:liyang
ID: 2864644
Have you done "modprobe ip_masq_ftp"? You'll need that in order to do active ftp from the inside. Place it in your rc.local script so it gets run at startup. Passive ftp should work either way, provided you don't restrict any outgoing connections.

hth
/Liyang

0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux Hosting 16 74
centos linux 65 185
Fuzzy search functionality DB2 UDB 3 30
DB2 - How to load results from a Stored Procedure into a table 8 19
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question