routing
Hello,
i have a question i have a linuxbak with 2 network cards eth0 ip: 10.0.0.138/ 255.255.255.0 connected to the adsl router ip 10.0.0.138/255.255.255.0 eth1 ip: 192.168.1.1/255.255.255.0 connected with a swith and a pc 1p: 192.168.1.3/255.255.255.0 how can i edit the routing table so i can acces internet throw the linux machine or do i have to change my netmasks??? help me greeting Wimpie |
Do you mean that you have other machines on the network that you want to let have internet access through linux. Like:
Code:
[Internet] |
yes can you help me bij giving me help
route add -net xx.xx.x.x.x..x i have redhat linux 8.0 tnx |
Re: routing
Quote:
|
ip etho 10.0.0.153
ip eth1 192.168.1.1 ip router 10.0.0.138 ip pc 192.168.1.3 sorry can you help me now?? |
1)Set the default gateways on each PC on the inside of the linux router to being the IP address of the linux router.
2) Enable ip forwarding on the linux router only: echo 1 > /proc/sys/net/ipv4/ip_forward 3) Enable ip masquerading on the linux router only: $IPTABLES -A FORWARD -i 10.0.0.138 -o 192.168.1.1 -m state --state ESTABLISHED,RELATED -j ACCEPT $IPTABLES -A FORWARD -i 192.168.1.1 -o 10.0.0.138 -j ACCEPT |
hello
so i have to set on the pc ip: 192.168.1.3 netmask 255.255.255.0 gateway 10.0.0.138 that does not work i think |
i have to upgrade my kernel or my iptables says linux how>?
|
no - the gateway should be the 192.168.1.1 address.
did you run iptables an not ipchains? My commands shold have been: /sbin/iptables -A FORWARD -i 10.0.0.138 -o 192.168.1.1 -m state --state ESTABLISHED,RELATED -j ACCEPT /sbin/iptables -A FORWARD -i 192.168.1.1 -o 10.0.0.138 -j ACCEPT |
sorry i have installed 7.3 and not 8.0 is that the problem
greeting wimpie |
i have iptables version 1.2.5
can that help you |
Yes you will need to use ipchains:
/sbin/ipchains -A forward -j MASQ -s 192.168.1.0/24 -d 0/0 |
hello
i have put in the line is that all i can now telnet my router but i dont have a connection to internet my router give out ip adresses by dhcp but i put a static ip for my eth0 from my linux server can that be the problem |
It could be a dns issue can you try the following two commands and see if you get any replies:
ping www.linuxquestions.org ping 64.179.4.146 |
Hello
Ping 64.179.4.146 works ping www.linuxquestions.org does not work so its a dns problem i gues what can i do about it |
All times are GMT -5. The time now is 05:03 PM. |