Re: iptables: port forwarding and hardware router

From: the seventh sign (die.spammers_at_theinternet.now)
Date: 09/18/03


Date: Thu, 18 Sep 2003 04:33:57 -0500


"Tom H. Lautenbacher" <Lautenbacher@gmx.net> wrote in message
news:bk9pa8$r51ju$1@ID-124600.news.uni-berlin.de...
> Hello NG,
>
> I have the following configuration:
>
> INTERNET
> |
> |
> DSL-ROUTER (PPPoATM)
> 192.168.1.1
> |
> | LINUX SERVER
> |------- eth1 (192.168.1.2)
> |
> |------- eth0 (192.168.0.1) (DNS, DHCP)
> |
> SWITCH
> / | \
> / | \
> PC PC PC
> (192.168.0.xxx)
>
> *****************************************
>
> The devices are configured like this:
>
> Router: (192.168.1.1)
> ===============
> 2 routes are configured. I can't set up more details, like ports etc, only
> the following:
> Destination GW/Interface Netmask
> 0.0.0.0 <external IP> 0.0.0.0
> 192.168.0.0 192.168.1.2 255.255.255.0
>
> Linux- Server:
> ==========
> 2 NICs:
> eth0 connected to switch, 192.168.0.1
> eth1 connected to router, 192.168.1.2
>
> /etc/sysconfig/network/routes:
> default 192.168.1.1 - -
>
> iptables:
> modprobe iptable_nat
> echo "1" > /proc/sys/net/ipv4/ip_forward
> iptables -t nat -A POSTROUTING -o ippp0 -j MASQUERADE
> iptables -A PREROUTING -t nat -p tcp --dport 1000 -j DNAT
> ... --to 192.168.0.150:1000
>
> /etc/dhcp.conf:
> option routers 192.168.0.1;
>
> Clients:
> ======
> (recieve all settings via DHCP)
>
> *****************************************
>
> With this settings, everything works fine, all clients can send and
recieve
> data from the internet.
>
> My Problem:
> The portforwarding doesn't seem to work. The client 192.168.0.150 doesn't
> get port 1000 forwarded, but reports a "firewalled-mode". Can anybody tell
> me, why?
>
> Thanx a lot!
>
> Tom.
>

In Mandrake's version of networking i had to change the 192.168.0.1 to
192.168.1.1 for some strange reason the networking doesn't like the .0. in
there in linux.

 INTERNET
         |
         |
 DSL-ROUTER (PPPoATM)
 192.168.1.1
        |
        | LINUX SERVER
        |------- eth1 (192.168.1.2) netmask 0.0.0.0
                                    |
        |------- eth0 (192.168.2.1) (DNS, DHCP) netmask 255.255.255.0 ****
        |
     SWITCH (Check to see if the uplink being used to send the data to eth0?
not nessarily turned on just plugged in to that port)
     / | \
   / | \
 PC PC PC (if any of these PC's are running windows anything run the
internet connection wizzard and set up the ether card that way)
 (192.168.2.xxx) netmask 255.255.255.0 ****

**** = Here is where i woudl make the changes!

as far as the firewall goes I haven't a clue.
this is just from the hardware standpoint.
TSS



Relevant Pages

  • iptables: port forwarding and hardware router
    ... I have the following configuration: ... eth0 connected to switch, 192.168.0.1 ... With this settings, everything works fine, all clients can send and recieve ... data from the internet. ...
    (comp.os.linux.networking)
  • iptables: port forwarding and hardware router
    ... I have the following configuration: ... eth0 connected to switch, 192.168.0.1 ... With this settings, everything works fine, all clients can send and recieve ... data from the internet. ...
    (alt.os.linux.suse)
  • Re: Remote Access and Outlook Web Access on SBS 2003
    ... SUMMARY OF SETTINGS FOR CONFIGURE E-MAIL AND INTERNET ... Internet Connection Wizard. ... network, firewall, secure Web site, and e-mail. ... NETWORKING CONFIGURATION SUMMARY ...
    (microsoft.public.windows.server.sbs)
  • ISA Array and NLB fail to work properly.
    ... I am trying to setup an array with two nodes clustered via NLB for fault tolerance and load balancing. ... I want clients configured with a single proxy address to use either of the two ISA machines, depending on load and availability, without requiring reconfiguration of the client's proxy configuration. ... When the clients are configured to use NodeA as the proxy, they are able to access the internet. ...
    (microsoft.public.isa.enterprise)
  • Re: Big hole??
    ... >supposedly safe SP2 for Windows XP invites any Internet user to have a look around your PC. ... Internet Connection Sharing of the PC has to be disabled. ... >A number of test scans run by PC-Welt revealed that this in fact is a common configuration ... >network at home: Often, we did not even encounter password protection. ...
    (microsoft.public.windowsxp.general)