LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-15-2003, 01:51 PM   #1
phishman3579
Member
 
Registered: May 2003
Posts: 161

Rep: Reputation: 32
DMZ help...


Can someone help me, I would like to set-up a DMZ in my iptables script. Is there a howto out there? I've been searching the forum and have found no good examples or howto's.

I basically want to let all traffic thru to my 192.168.0.252 dhcp client.
 
Old 07-15-2003, 04:32 PM   #2
jstu
Member
 
Registered: Jan 2002
Distribution: slackware
Posts: 193

Rep: Reputation: 30
Why dont you post your network setup I think a dmz may be more than your asking for.
 
Old 07-15-2003, 05:24 PM   #3
hakcenter
Member
 
Registered: Apr 2003
Location: Not to far from the computer screen
Distribution: RedHat 9.0
Posts: 324

Rep: Reputation: 30
i dont see the purpose as well...

as i was aware dmz just routes all new traffic to the dmz then to virtuals then dropped if nothing.
 
Old 07-15-2003, 06:39 PM   #4
phishman3579
Member
 
Registered: May 2003
Posts: 161

Original Poster
Rep: Reputation: 32
Quote:
Originally posted by hakcenter
i dont see the purpose as well...

as i was aware dmz just routes all new traffic to the dmz then to virtuals then dropped if nothing.
Basically, I can't get my ps2 to work thru my current firewall. I get's online but can't get past that. I am assuming that it is getting firewalled because when I hook it up to the modem (without firewall intervention), it works fine.

I basically want everything in and out of 192.168.0.252 to be untouched but I can't seem to find the way. If you all have a better suggestion, im all ears but the best advice I heard was a DMZ.
 
Old 07-15-2003, 06:42 PM   #5
phishman3579
Member
 
Registered: May 2003
Posts: 161

Original Poster
Rep: Reputation: 32
basically my net setup is...
eth0 is internet
eth1 is LAN

I have about 4 computers on the net 192.168.0.254..192.168.0.251..

My ps2 is 192.168.0.252, I would like all info to be passed without any kind of firewall intervention in and out of that IP. Right now, the ps2 can get online but some of the ports are closed (it's diff for each game), so I want to open all ports to the ps2 incoming and outgoing.
 
Old 07-15-2003, 08:49 PM   #6
jstu
Member
 
Registered: Jan 2002
Distribution: slackware
Posts: 193

Rep: Reputation: 30
I think your looking for something liKE this

$IPTABLES -t nat -A PREROUTING -p TCP -i $INTERNAL_IFACE --dport $whateverports -j DNAT --to-destination $PS2_IP

This will redirect tcp $whateverports traffic to the ps2 ip.
 
Old 07-15-2003, 09:37 PM   #7
phishman3579
Member
 
Registered: May 2003
Posts: 161

Original Poster
Rep: Reputation: 32
Quote:
Originally posted by jstu
I think your looking for something liKE this

$IPTABLES -t nat -A PREROUTING -p TCP -i $INTERNAL_IFACE --dport $whateverports -j DNAT --to-destination $PS2_IP

This will redirect tcp $whateverports traffic to the ps2 ip.
would 0:65000 forward every port?
 
Old 07-15-2003, 11:27 PM   #8
jstu
Member
 
Registered: Jan 2002
Distribution: slackware
Posts: 193

Rep: Reputation: 30
I dont see why not. I've never tried it though.
 
Old 07-15-2003, 11:38 PM   #9
phishman3579
Member
 
Registered: May 2003
Posts: 161

Original Poster
Rep: Reputation: 32
I still can't get online with this gosh darb ps2... This makes no sence...
 
Old 07-17-2003, 10:15 AM   #10
german
Member
 
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Debian etch, Gentoo
Posts: 312

Rep: Reputation: 30
Um this post is useless... I have to read a little more carefully next time

Sorry guys...


It sounds like you're trying to set up a DMZ with 2 boxen. From my experience you need at least 3, one for routing (3 NIC's), one for "the trenches", and one for DMZ. The idea is that your servers are on a different subnet than your workstation(s), and even this isn't exactly killer security. Any DMZ I set up would be a gateway firewall on the front lines, then my servers, alongside an "invisible slut" bridge* (no ip's, promiscuous mode) which leads to my workstations, and silently drops virtually all inbound traffic without a record in the state table. This setup makes it extremely difficult to attack the DMZ workstations, as you have to get past the initial routing firewall, then the slut bridge, which has no IP address to attack. It may be a good idea to put 3 NIC's in the DMZ bridge, so that you can retrieve log files etc. and administrate remotely, just make sure the one with an IP is on the workstation side so it utilizes the security of the other two.

HTH

B.

Last edited by german; 07-17-2003 at 10:17 AM.
 
Old 07-17-2003, 10:19 AM   #11
german
Member
 
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Debian etch, Gentoo
Posts: 312

Rep: Reputation: 30
Quote:
Originally posted by phishman3579
would 0:65000 forward every port?
0:65535 would, in theory...

B.
 
Old 07-17-2003, 03:32 PM   #12
phishman3579
Member
 
Registered: May 2003
Posts: 161

Original Poster
Rep: Reputation: 32
Quote:
Originally posted by german
Um this post is useless... I have to read a little more carefully next time

Sorry guys...


It sounds like you're trying to set up a DMZ with 2 boxen. From my experience you need at least 3, one for routing (3 NIC's), one for "the trenches", and one for DMZ. The idea is that your servers are on a different subnet than your workstation(s), and even this isn't exactly killer security. Any DMZ I set up would be a gateway firewall on the front lines, then my servers, alongside an "invisible slut" bridge* (no ip's, promiscuous mode) which leads to my workstations, and silently drops virtually all inbound traffic without a record in the state table. This setup makes it extremely difficult to attack the DMZ workstations, as you have to get past the initial routing firewall, then the slut bridge, which has no IP address to attack. It may be a good idea to put 3 NIC's in the DMZ bridge, so that you can retrieve log files etc. and administrate remotely, just make sure the one with an IP is on the workstation side so it utilizes the security of the other two.

HTH

B.
The only think I have in my DMZ would be the PS2 and from my limited knowldge. You can't do jack squat to a ps2 box that's firewall-less.

I can get thru my windows firewall with the ps2, so there HAS to be a way for it to work with linux. I just have no freakin idea what is holding it up. It can get online but can't connect to any game servers.
 
Old 07-17-2003, 03:48 PM   #13
hakcenter
Member
 
Registered: Apr 2003
Location: Not to far from the computer screen
Distribution: RedHat 9.0
Posts: 324

Rep: Reputation: 30
iptables -t nat PREROUTING -p tcp -s ! 192.168.0.0./255.255.255.0 --dport 0-65000 -j DNAT --to 192.168.0.2:0-65000
iptables -t nat PREROUTING -p udp -s ! 192.168.0.0./255.255.255.0 --dport 0-65000 -j DNAT --to 192.168.0.2:0-65000
 
Old 07-17-2003, 05:20 PM   #14
jstu
Member
 
Registered: Jan 2002
Distribution: slackware
Posts: 193

Rep: Reputation: 30
Why dont you just post your firewall script. Those prerouting rules are worthless if your just running client services behind your firewall.
 
Old 07-17-2003, 06:25 PM   #15
hakcenter
Member
 
Registered: Apr 2003
Location: Not to far from the computer screen
Distribution: RedHat 9.0
Posts: 324

Rep: Reputation: 30
i put them up for shear testing
 
  


Reply



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
DMZ HowTo jackster Linux - Security 2 01-21-2005 11:07 AM
what is dmz blackzone Linux - Networking 3 01-06-2005 05:46 AM
DMZ help phishman3579 Linux - Security 1 07-15-2003 04:47 PM
How to Setup DMZ? Manuel-H Linux - Networking 1 04-06-2003 12:55 PM
qmail on dmz alexg Linux - Software 0 02-26-2003 08:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:49 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
Open Source Consulting | Domain Registration