#1  
Old 16th July 2009, 12:26
psykosen psykosen is offline
Junior Member
 
Join Date: Jul 2009
Location: Denmark
Posts: 26
Thanks: 5
Thanked 5 Times in 4 Posts
Default Nat Gateway ??? help

hey guys

I have a small problem I am about to put a new lan network together in my company! it is intended that the Internet connection goes into my (DHCP, PXE, File and print) server! These works perfect but I can not get internet to work! I have tried forwarding (eth0 => eth1) with iptables and it will not work(for me)

this is what I have tried!!

Quote:
echo 1 > /proc/sys/net/ipv4/ip_forward
then

To delete existing rules from every iptables table, execute the following commands:
Quote:

iptables -F
iptables -t nat -F
iptables -t mangle -F

Quote:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth1 -j ACCEPT
and then i type "iptables -L" i get this output
Quote:
gate1:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
should it not show that it forwarded from eth0 => eth1
i'm not a guro in iptables so eny help is welcome
i'm totaly lost there

I have searched online for some days now and can not really find a solutions that works have tried this howto but without result
searched howtoforge for iptables, forwarding etc..
but nothing seem to work(mabe its me )

looked over my log files even trail -f whill the client boots up but now errors there

Regards
Psykosen

oh! i'm running Debian lenny with DHCP, PXE, File and Print server
and it works perfect nothing there
Reply With Quote
Sponsored Links
  #2  
Old 16th July 2009, 13:07
dipeshmehta dipeshmehta is offline
Senior Member
 
Join Date: Nov 2008
Location: Rajkot, India
Posts: 173
Thanks: 5
Thanked 13 Times in 13 Posts
Send a message via Yahoo to dipeshmehta Send a message via Skype™ to dipeshmehta
Default

try uncommenting following line in /etc/sysctl.conf
Code:
net.ipv4.ip_forward=1
hope this works.

Dipesh
Reply With Quote
  #3  
Old 16th July 2009, 15:24
psykosen psykosen is offline
Junior Member
 
Join Date: Jul 2009
Location: Denmark
Posts: 26
Thanks: 5
Thanked 5 Times in 4 Posts
Default

no it did not work but thanks any way
it's for the first time I put such a system up so bear with me, only used linux for about 7 months

other proposals would be nice thanx again
Reply With Quote
  #4  
Old 20th July 2009, 12:26
fayax fayax is offline
Junior Member
 
Join Date: Mar 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try this and post the output.
Code:
iptables -L -t nat
Reply With Quote
  #5  
Old 20th July 2009, 18:18
psykosen psykosen is offline
Junior Member
 
Join Date: Jul 2009
Location: Denmark
Posts: 26
Thanks: 5
Thanked 5 Times in 4 Posts
 
Default

hi this is the output off iptables -L -t nat

Code:
Chain PREROUTING (policy ACCEPT)
target              prot opt source                 destination        

Chain POSTROUTING (policy ACCEPT)
target              prot opt source                 destination  
MASQUERADE          all -- anywhere                  anywhere

Chian OUTPUT (policy ACCEPT)
target             prot opt source                 destination
to me it's looks okay i meen it ACCEPTS all the way around????
Reply With Quote
Reply

Bookmarks

Tags
forwarding, gateway, nat

Thread Tools
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 On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix nat + multiple mail hostnames rvarkevisser Installation/Configuration 2 26th January 2009 17:30
1:1 NAT on Ubuntu Server Seth HOWTO-Related Questions 5 21st January 2009 02:19
Howto analyse a IPTables firewall issue? chillifire Installation/Configuration 2 27th August 2008 07:23
Iptables gateway with one lan adapter tsmr Installation/Configuration 1 7th August 2008 12:02
Postfix, dovecot mail gateway Sabre4 HOWTO-Related Questions 2 6th April 2006 01:36


All times are GMT +2. The time now is 16:26.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.