Iptables and Script to make it possible (Help me please)

This is a discussion on Iptables and Script to make it possible (Help me please) within the Linux Security forums, part of the System Security and Security Related category; Hello i need to to NAT with DNAT and i think SNAT too. this is my lan (attached to a ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-14-2005
Guillermo Javier Nardoni
 
Posts: n/a
Default Iptables and Script to make it possible (Help me please)

Hello i need to to NAT with DNAT and i think SNAT too.
this is my lan (attached to a file)

this is my situation

Server Linux running RedHat 9 shrike
with this configuration

eth0 (two aliases)
eth0:0 IP: 192.168.0.1
NETMASK: 255.255.255.0

eth0:1 IP: 192.168.1.1
NETMASK: 255.255.255.0

eth1 IP: 10.0.0.1
NETMASK: 255.0.0.0

ppp0 PPPoE used over eth1 to connect linux server to internet


SERVER W2K

eth0 IP: 192.168.1.100; 192.168.1.101; 192.168.1.102
NETMASK: 255.255.255.0


LAN: subnet: 192.168.0.0/24

so i want to do NAT over my LAN, it means a client wich ip is
192.168.0.65 for example could have full acces to internet
but all incoming packets comes from ppp0 at theses ports 27015 27016
27017 and port 80 have to DNAT to 192.168.1.100 ip address and i guess
SNAT too, to my W2k server

i don't know how to do the script to make it possible, could you lend
me a hand please.-



--
Atte.
Guillermo Javier Nardoni
Estudiante de Ing. en Sistemas
Tel: 03402-15540590
Reply With Quote
  #2 (permalink)  
Old 03-17-2005
jayjwa
 
Posts: n/a
Default Re: Iptables and Script to make it possible (Help me please)

On 2005-03-14, Guillermo Javier Nardoni <gjnardoni@gmail.com> wrote:
> Hello i need to to NAT with DNAT and i think SNAT too.
> this is my lan (attached to a file)
>
> this is my situation
>
> Server Linux running RedHat 9 shrike
> with this configuration
>
> eth0 (two aliases)
> eth0:0 IP: 192.168.0.1
> NETMASK: 255.255.255.0
>
> eth0:1 IP: 192.168.1.1
> NETMASK: 255.255.255.0
>
> eth1 IP: 10.0.0.1
> NETMASK: 255.0.0.0
>
> ppp0 PPPoE used over eth1 to connect linux server to internet
>
>
> SERVER W2K
>
> eth0 IP: 192.168.1.100; 192.168.1.101; 192.168.1.102
> NETMASK: 255.255.255.0
>
>
> LAN: subnet: 192.168.0.0/24
>
> so i want to do NAT over my LAN, it means a client wich ip is
> 192.168.0.65 for example could have full acces to internet
> but all incoming packets comes from ppp0 at theses ports 27015 27016
> 27017 and port 80 have to DNAT to 192.168.1.100 ip address and i guess
> SNAT too, to my W2k server
>
> i don't know how to do the script to make it possible, could you lend
> me a hand please.-


I just had to learn this too. What helped me was the docs here ->

http://www.netfilter.org/

They have alot of howto's. The one on NAT should work for you nicely, if you
already know shell scripting. If not, it's not hard to learn either. You only
need basic shell constructs to make an effective firewall/NAT'er.

--
RedHat Linux: How linux would have looked if
Micro$oft had written it.
HP/UX & AIX: What keeps linux users still using
30yr old "compatibility" defaults in our builds
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 03:21 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0