View Full Version : Configure my second Network Card to internet
ruben.zamora
2007-04-09, 10:33 PM CDT
Hi. Is me first time that i install Fedora and look ok...
I have 2 eth in muy computer eth0 is IP 10.21.1.1 netmask 255.255.255.0 and i all ready configure my conection with ADSL (Infinitum) ppp0 and works ok....
And my second one is eth1 IP 172.168.1.5 netmask 255.255.255.0 and i configure DCHP, assign 172.168.1.20/172.168.1250 and works ok..
But i need to forward al the 172.168.1.x to ppp0 ????
I really dont understand who??? I need to make a Route and IPTABles?
Can you Help me
thansk
Ruben
DollaBillz217
2007-04-10, 08:49 AM CDT
You can use something like:
route add -net 172.50.1.0 netmask 255.255.255.0 gw xxx.xxx.xxx.xxx
to add a route if needed or you could utilize an access control list (acl) on your local router if you have one.
If neither of the above options seem logical or anre't available to you, look at this website for reference:
http://linux-ip.net/html/routing-selection.html
This should be very easy for you to set up. If not let me know.
~$Billz~
ruben.zamora
2007-04-10, 05:44 PM CDT
I still have the problem...
In my server i can go out to internet by the ppp0 and eth0.
But i have a computer in the eth1 and i cant go out to internt.
I do a ping in the computer 172.168.1.1 and is ok.
But when i open the browser i cant go out
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
200.38.193.226 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
172.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.21.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 200.38.193.226 0.0.0.0 UG 0 0 0 ppp0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
eth0 Link encap:Ethernet HWaddr 00:08:54:B0:41:B5
inet addr:10.21.1.5 Bcast:10.21.1.255 Mask:255.255.255.0
inet6 addr: fe80::208:54ff:feb0:41b5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2385 errors:0 dropped:0 overruns:0 frame:0
TX packets:979 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:473344 (462.2 KiB) TX bytes:178172 (173.9 KiB)
Interrupt:209 Base address:0x1000
eth1 Link encap:Ethernet HWaddr 00:15:60:52:AA:15
inet addr:172.168.1.1 Bcast:172.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::215:60ff:fe52:aa15/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:429 errors:0 dropped:0 overruns:0 frame:0
TX packets:194 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:45060 (44.0 KiB) TX bytes:22240 (21.7 KiB)
Interrupt:169
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1501 errors:0 dropped:0 overruns:0 frame:0
TX packets:1501 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3203732 (3.0 MiB) TX bytes:3203732 (3.0 MiB)
ppp0 Link encap:Point-to-Point Protocol
inet addr:189.153.165.249 P-t-P:200.38.193.226 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:739 errors:0 dropped:0 overruns:0 frame:0
TX packets:852 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:352791 (344.5 KiB) TX bytes:147897 (144.4 KiB)
ruben.zamora
2007-04-11, 07:43 AM CDT
I do some changes in the configuration of the Lan and the DHCP....
I assign Postrouting to the ppp0
And Right now in a computer with a ip assgn by the DHCP in the server, i can ping Valid Ip Adrress, but i cant resolv to use my browser.
Any Idea what i miss???
DollaBillz217
2007-04-11, 08:11 AM CDT
Check your DNS to see if the IP is being resolved to the correct hostname. Might have a host (A) file you need cleared out. Or it might be because the cards are on different subnets and it cant resolv that ip because its on a different subnet. Not quite sure
ruben.zamora
2007-04-11, 09:52 AM CDT
Can you give a tips, Where can i see???
DollaBillz217
2007-04-11, 10:10 AM CDT
Actually I think you have to put in your gateway so the other ethernet ports know where to direct their traffic to. Go to /etc/sysconfig/network-scripts
and look at your eth ports and see if they have the gateway entered. If not enter them by putting:
GATEWAY=xxx.xxx.xxx.xxx (where the xxx is your gateway IP)
Hope this helps
ruben.zamora
2007-04-11, 10:34 AM CDT
eth0 10.21.1.5 gw 10.21.1.7 (Router)
In the server i go out in the browser excelent.
/etc/sysconfig/newtork-scripts
eth1 (LAN) 10.21.0.1 NO GATEWAY
after that i Add a line GATEWAY=10.21.0.1
I restart the network services.
Connect with my Laptop by the eth1 assing me a IP 10.21.0.240
I trie to ping out y doesnt answer??
ruben.zamora
2007-04-11, 11:11 AM CDT
I found these in my /var/log/messages
Apr 11 11:57:04 pruzys dhcpd: Unable to add forward map from FERNANDO.pruzys.com to 10.21.0.240: timed out
Apr 11 11:57:04 pruzys dhcpd: DHCPREQUEST for 10.21.0.240 from 00:17:08:34:47:9b (FERNANDO) via eth1
Apr 11 11:57:04 pruzys dhcpd: DHCPACK on 10.21.0.240 to 00:17:08:34:47:9b (FERNANDO) via eth1
Apr 11 11:57:07 pruzys dhcpd: Unable to add forward map from FERNANDO.pruzys.com to 10.21.0.240: timed out
Apr 11 11:57:07 pruzys dhcpd: DHCPREQUEST for 10.21.0.240 from 00:17:08:34:47:9b (FERNANDO) via eth1
Apr 11 11:57:07 pruzys dhcpd: DHCPACK on 10.21.0.240 to 00:17:08:34:47:9b (FERNANDO) via eth1
DollaBillz217
2007-04-11, 01:31 PM CDT
This means that the client has almost been configured with a fully-qualified domain name, except that the root label was left off. On the DHCP client, you need to do this:
send fqdn.fqdn "laptop.yfd.example.";
not this:
send fqdn.fqdn "laptop.yfd.example";
Notice the trailing '.' in the first example. If the client doesn't send a fully-qualified domain name, the DHCP server assumes that the name is to be added in a forward zone that has been configured on the server. You will also see this behavior if the client has not been configured to tell the server that it will update its own A record. You must have this line in your dhclient.conf:
send fqdn.server-updates false;
Obviosuly fqdn.server is your own syntax, not fqdn.server
If you keep having problems go here
http://www.ops.ietf.org/dns/dynupd/secure-ddns-howto.html
ashwiz
2007-06-21, 09:38 AM CDT
Hi there
You might try simply install the FireStarter firewall. When you run it the first time it asks you
-which is the inside network card
-which is the external (web) network card
-do you want NAT (yes!)
and it configures everything for you...
download from:
http://www.fs-security.com/
(when you feel very comfortable, you can move up to the ShoreWall firewall configuration tool,
which gives you much more control, but takes a bit longer to install and configure)
Hope that helps a bit!
kind regards
ashley
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.