public inbox for speakup@linux-speakup.org
 help / color / mirror / Atom feed
* iptables questions
@  Tyler Littlefield
   ` Gregory Nowak
   ` Willem van der Walt
  0 siblings, 2 replies; 14+ messages in thread
From: Tyler Littlefield @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

Hello list,
I tried running endoshield, and got a ton of errors.
So, now I will try to do it manually. I'm going through a tutorial now, and I have a coupel questions.
I can do the following.
iptables -A INPUT -p tcp -dport 2200 -j queue
iptables -A INPUT -p tcp -sport 2200 -j queue
to allow for the traffic on port 2200 to go through. I think.
But, lets say I create a rule for each port. The ones I want to allow, and the ones I don't want to allow.
I think I can use a -s to make it only local if I want.
Then, how would I block the ports that I haven't created rules for?
next, if I set up the box as a DMZ, in front of the router, is there a way that I can make it manage all traffic coming in and out of the network? Just like the router would?
Thanks,
~~TheCreator~~
website:
http://tysplace.shaned.net
msn:
compgeek134@hotmail.com
aim:
st8amnd2005
skype:
st8amnd127
moo coder/wizard and administrator

^ permalink raw reply	[flat|nested] 14+ messages in thread
* IPTABLES QUESTIONS
@  Doug Lawlor
  0 siblings, 0 replies; 14+ messages in thread
From: Doug Lawlor @  UTC (permalink / raw)
  To: speakup

Hello list,  When I forward ports to a machine behind a firewall
traffic only seems to be going to the lowest port in the range.    The
following list using the command 'iptables -t nat -L' illustrates this.  

DNAT       udp  --  anywhere
hostname.domainudp dpts:2074:2076
to:192.168.0.2:2074
DNAT       udp  --  anywhere
hostname.domainudp dpts:4074:4076
to:192.168.0.2:4074

The commands used to forward the ports are as follows:

# Forward ports 2074-2076 to 192.168.0.2
iptables -A PREROUTING -t nat -p udp -d $MYIP --dport 2074:2076 -j DNAT
--to 192.168.0.2:2074:2076
# Forward ports 4074-4076 to 192.168.0.2
iptables -A PREROUTING -t nat -p udp -d $MYIP --dport 4074:4076 -j DNAT
--to 192.168.0.2:4074:4076

$MYIP is a variable which gets the current dynamically assigned IP
from
eth0 using the following sed expression
MYIP=`ifconfig eth0 | sed '/.*addr:/!d;s///;s/ .*//'`

If I am thinking straight the list generated with 'iptables -t nat -L'
should look like the following.  

DNAT       udp  --  anywhere
hostname.domainudp dpts:2074:2076
to:192.168.0.2:2074:2076
DNAT       udp  --  anywhere
hostname.domainudp dpts:4074:4076
to:192.168.0.2:4074:4076

How can I make this happen?  The iptables commands I am using in the
firewall script are just not doing it.  

Thanks in advance,  

Doug

-- 
Make sure your E-mail can be read by everyone!
http://www.betips.net/etc/evilmail.html

Doug Lawlor <dlawlor@roadrunner.nf.net>


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~ UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
 iptables questions Tyler Littlefield
 ` Gregory Nowak
   ` Tyler Littlefield
     ` Alex Snow
     ` Gregory Nowak
       ` Tyler Littlefield
         ` Gregory Nowak
           ` Tyler Littlefield
           ` John Heim
             ` Tyler Littlefield
             ` Gregory Nowak
               ` Tyler Littlefield
 ` Willem van der Walt
  -- strict thread matches above, loose matches on Subject: below --
 IPTABLES QUESTIONS Doug Lawlor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).