Fedora Linux Support Community & Resources Center
  #1  
Old 10th January 2007, 09:53 PM
swimm3r Offline
Registered User
 
Join Date: Aug 2006
Posts: 21
eth0 -> eth1

hello

I have 2 cards, eth0 and eth1... eth0 is used for internet and eth1 for intranet
I want to "give" access to internet to the card eth1. how can I do that?!

I tried to use "setup"-> firewall setting... I setelct Trust to eth0 and MASQUERADE to etho, but no good

please help me! thanks
Reply With Quote
  #2  
Old 10th January 2007, 10:28 PM
Brian1's Avatar
Brian1 Offline
Registered User
 
Join Date: Nov 2004
Location: Seymour, Indiana
Posts: 2,511
You want to have machines connected to eth1 to have internet access correct.

If that is correct things to check.
Post current iptables script.
Post output from ' ifconfig -a '
Post output from ' route -n '

Now of course I assume the eth0 works fine to the internet. If so when you setup the eth1 you need to set the IP and netmask. Do not set a gateway on that nic. Masquerade will handle that for you.

Brian
__________________
Distribution: RHEL 5.1 with Pieces of this and that.
Kernel 2.6.23.9, KDE 3.5.8 and KDE 4.0 beta, Plus Development src.rpm, ATI fglrx64_7_1_0-8.433-1 rpm with 3D and DRI working.
Acer 5100-5840 with webcam, ati, sdcard reader, sound, atheros based wireless, all working. Only thing not working is the memory stick reader.
Reply With Quote
  #3  
Old 11th January 2007, 03:33 PM
bkarankar Offline
Registered User
 
Join Date: Jan 2007
Age: 31
Posts: 10
hey,
you have to reconfig ur eth1 like :
make eth0's ip as gatway
and Give Dns of ur internet
then restart/reload network service
u can also try
ifdown eth1
ifup eth1
good luck budy.
bkarankar
Reply With Quote
  #4  
Old 11th January 2007, 03:34 PM
bkarankar Offline
Registered User
 
Join Date: Jan 2007
Age: 31
Posts: 10
if need, then config proxy
Reply With Quote
  #5  
Old 11th January 2007, 04:52 PM
Zotter's Avatar
Zotter Offline
Registered User
 
Join Date: May 2004
Location: Central Wyoming
Posts: 637
http://easyfwgen.morizot.net/gen/

And don't forget the '1' in /proc/sys/net/ipv4/ip_forward either.

It'd be handy go get DHCP and at least a caching DNS server going on that box too.
__________________
If it ain't broken - you're not really trying....
Registered Linux user #227845
Reply With Quote
  #6  
Old 12th January 2007, 10:20 AM
swimm3r Offline
Registered User
 
Join Date: Aug 2006
Posts: 21
iptables -F
iptables -t nat -F
iptables -X

#to open 1111 udp and 2222 tcp I use...
iptables -A INPUT -p udp -m udp --dport 1111 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 2222 -j ACCEPT

iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -i eth0 -j DROP

iptables -A FORWARD -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

#to forward 1234 tcp from etho to 192.168.1.2 I used
iptables -t nat -A PREROUTING -d <internet_ip> -i eth0 -p tcp -m tcp --dport 1234 -j DNAT --to-destination 192.168.1.2

Now all it"s ok. Thanks all for the support

LL
Reply With Quote
  #7  
Old 13th January 2007, 07:52 PM
Brian1's Avatar
Brian1 Offline
Registered User
 
Join Date: Nov 2004
Location: Seymour, Indiana
Posts: 2,511
How did you setup eth1?
What settings did you set?
Post the contents of /etc/sysconfig/network-scripts/ifcfg-eth1

Brian
__________________
Distribution: RHEL 5.1 with Pieces of this and that.
Kernel 2.6.23.9, KDE 3.5.8 and KDE 4.0 beta, Plus Development src.rpm, ATI fglrx64_7_1_0-8.433-1 rpm with 3D and DRI working.
Acer 5100-5840 with webcam, ati, sdcard reader, sound, atheros based wireless, all working. Only thing not working is the memory stick reader.
Reply With Quote
  #8  
Old 13th January 2007, 08:03 PM
swimm3r Offline
Registered User
 
Join Date: Aug 2006
Posts: 21
# Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+
DEVICE=eth1
HWADDR=00:40:xx:xx:xx:xx
ONBOOT=yes
DHCP_HOSTNAME=fedora
IPADDR=192.168.x.x
NETMASK=255.255.255.0
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
Reply With Quote
Reply

Tags
>, eth0, eth1

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
eth0 is now eth1 - how to fix? dchicks Hardware & Laptops 2 12th January 2009 11:03 PM
eth0 to eth1 tronic Servers & Networking 3 23rd January 2007 09:27 PM
eth0 and eth1 pedrolopes Servers & Networking 2 19th February 2005 02:02 PM


Current GMT-time: 16:31 (Friday, 24-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat