LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-03-2003, 03:20 PM   #1
upr8830
LQ Newbie
 
Registered: Jun 2003
Posts: 11

Rep: Reputation: 0
Unhappy IP Masquerading


I am trying to setup IP forwarding routine on my gateway machine.

The gateway machine has 2 ethernet cards

eth0 (conneted to WAN):
IP Add: 205.25.25.194
Gateway: 205.25.25.193

eth1 (connected to LAN)
Ip Add: 192.169.0.1
Gateway: 205.25.25.194

From computers within the LAN i can ping eth0 in my gateway but I can't ping anything beyound that.

I set up IP forwarding accordingly to the HOWTO spplied at
http://www.tldp.org/HOWTO/IP-Masquerade-HOWTO/

Please help. If i need to provide any more information just say so.
Also can you provide me with any other site that give a good description on to set up ip forwarding.

thank you.

upr8830
 
Old 06-03-2003, 04:09 PM   #2
zmedico
Member
 
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707

Rep: Reputation: 30
The key parts with iptables are like this:

$IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -t nat -A POSTROUTING -o $WAN_IFACE -s $LAN_HOSTS -j MASQUERADE
$IPTABLES -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -m state --state NEW -i $LAN_IFACE -o $WAN_IFACE -s $LAN_HOSTS -j ACCEPT

How did you do it?
 
Old 06-03-2003, 04:30 PM   #3
Blindsight
Member
 
Registered: Mar 2003
Distribution: Slackware
Posts: 234

Rep: Reputation: 30
dns

Make sure, when testing connectivity, you KISS. Check first if you can ping IP addresses outside your network. If you can, THEN try DNS. Start with the lowest level and work your way up. Something else you can try is traceroute. Try 'traceroute <some outside IP address>' and see where it fails. If it fails at eth1, you may want to check your forwarding configuration.

Your link seems very complete in explaining IP forwarding to you. Recheck your config, a lot of time's you'll find stupid mistakes.

My 2 cents.
 
Old 06-04-2003, 02:00 PM   #4
upr8830
LQ Newbie
 
Registered: Jun 2003
Posts: 11

Original Poster
Rep: Reputation: 0
Talking

The problem was with my IP table entry. I had made some silly mistakes. Have corrected them and now the IP forwarding is working great.

Thanks

- upr8830
 
  


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
IP Masquerading ? emailssent Linux - Networking 1 10-07-2004 10:49 PM
help ip masquerading campusloop Linux - Networking 1 05-20-2004 12:37 PM
IP masquerading. somebody help me! Johnsernickle Linux - Networking 4 10-22-2002 06:57 PM
IP Masquerading kwigibo Linux - Networking 3 09-21-2002 07:46 PM
ip masquerading artman62 Linux - Security 5 08-13-2002 07:57 PM

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

All times are GMT -5. The time now is 02:52 AM.

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