LinuxQuestions.org
Visit Jeremy's Blog.
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 03-11-2005, 09:46 AM   #1
berrance
Member
 
Registered: Aug 2004
Location: Hull - England
Distribution: Ubunto and slowly switching to debian
Posts: 308

Rep: Reputation: 30
ip tables problem


hi i im half way through a compleat overhaul of my network and OS's that are on it meaning everything is backed up and then formated to start from scratch. on my network i have my main server that does everything exept connect to the internet i have a seporate machine that connects to the internet and acts as a proxy which i have set up properly and works axept for iptables

on the machine that connects to the internaet it has 2 interfaces

eth0 - connects the the internet
eth1 - connects to internal network

what i want to do is forward all trafic incoming from the internet on eth0 through eth1 to the ip address 10.20.99.253 (my main server)

i have done this the same way i used to by doing this

iptables -t nat -A PREROUTING -i eth0 -d public-IP -j DNAT --to-destination 10.20.99.253

this used to work and no longer does i have removed all other iptables rules so i know it isnt that. when iptables doesnt have any rules i can ping the machine but when i add the rule i cannot ping at all with this rule i thought it would ping my main server also no other ports work using this rule even though they are all open on my server aswell as my connection machine

as i say this usedto work so i dont know why it no longer does

thanks for any ideas or help

berrance
 
Old 03-11-2005, 01:56 PM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
You need to have a matching POSTROUTING rule to SNAT traffic going out on eth0 to the public ip number.

This is for replies that are not handled by conntrack until the stream has passed a small quantity of traffic, or doesn't go through the proxy..
 
  


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
problem concerning Latex-tables Philippe77 Linux - Software 0 11-28-2005 09:12 AM
Newbie IP tables problem benbroad Linux - Security 7 11-29-2004 02:21 PM
Possible IP tables problem? jstreed Debian 3 11-02-2004 11:19 AM
ip-tables problem bhagat_panwar Linux - Security 2 08-27-2003 09:29 PM
IP tables problem DonMiner Linux - Networking 7 07-30-2003 09:20 AM

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

All times are GMT -5. The time now is 09:29 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