PCANW
asked on
how Linux Network Configuration
Hello everyone,
I'm confused between iptables and route
-I have a fedora server that has 2 interfaces
External : p2p1
it pings from server device internal IP to client IP but doesn’t ping from server external IP to client IP
I did the iptables to allow the traffic in the forward chain
also changed to enable sysctl net.ipv4.ip_forward=1
after doing these the client can access the internet..
now why do we need route?
And I wish I could use route but I didn’t understand it. I did like that on server but I really don’t understand it and I delete it before doing iptables
and also I have another a question how can I use my external ip address as DNS.
Thanks guys!
I'm confused between iptables and route
-I have a fedora server that has 2 interfaces
External : p2p1
IP 192.168.110.110/24
Gw 192.168.110.1
DNS 192.168.110.1
Internal : p2p2IP 192.168.206.1/24
Gw 192.168.110.110
DNS 0.0.0.0
-Client IP 192.168.206.2/24
Gw 192.168.206.1
DNS 192.168.110.1
The firewall is disable in the serverit pings from server device internal IP to client IP but doesn’t ping from server external IP to client IP
I did the iptables to allow the traffic in the forward chain
# iptables –t nat –A POSTROUTING –o p2p1 –MASQUERADE
#iptables –t nat –A PREROUTING –p tcp –d 192.168.110.1-–dport 80 –j DNAT -–to 192.168.206.1
#iptable -A FORWARD –p tcp –d 192.168.206.1–-dport 80 –j ACCEPT
also changed to enable sysctl net.ipv4.ip_forward=1
after doing these the client can access the internet..
now why do we need route?
And I wish I could use route but I didn’t understand it. I did like that on server but I really don’t understand it and I delete it before doing iptables
route add -net 192.168.206.1 netmask 255.255.255.0
gw 192.168.110.1 p2p2
please I am really confused between these if someone can help me. I need my network has more security..and also I have another a question how can I use my external ip address as DNS.
Thanks guys!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
oop, I made a mistake. i will correct the point between you guys I will call them to correct that on monday because you all helped me
Thanks again
Thanks again
ASKER
arnold, I think you mean the routing table on the fedora box should be
192.168.110.0 255.255.255.0 192.168.110.1 p2p1
192.168.206.0 255.255.255.0 192.168.206.1 p2p2 ? Is that right?
192.168.110.0 255.255.255.0 192.168.110.1 p2p1
192.168.206.0 255.255.255.0 192.168.206.1 p2p2 ? Is that right?
Right.
ASKER
Thanks!!
ASKER
what about DNS?