Hello,
I've been working on this for over a week. I don't think its working the way it should.
Here's what I'm trying to do:
I have a Windstream dsl router with wireless > 192.168.1.100 | | Centos 6.8 server eth0 > 192.168.1.110 > gateway 192.168.1.111 eth1 > 192.168.1.111 > gateway 192.168.1.100 | | Switch > other computers and devices > gateway 192.168.1.110
I want to send all internal traffic through 192.168.1.110, all external traffic through 192.168.1.111, then back through 192.168.1.110.
I did an iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
Issues:
Outside connectivity for all other computers and devices only works if eth0 is also connected to the router, server works Iptraf shows no traffic on eth1
Hope I haven't confused you as I have thoroughly confused myself.
TIA
TE Dukes
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of TE Dukes Sent: Saturday, September 3, 2016 7:31 AM To: 'CentOS mailing list' Subject: [CentOS] Networking/routing issue
Hello,
I've been working on this for over a week. I don't think its working the
way it
should.
Here's what I'm trying to do:
I have a Windstream dsl router with wireless > 192.168.1.100 | | Centos 6.8 server eth0 > 192.168.1.110 > gateway 192.168.1.111 eth1 > 192.168.1.111 > gateway 192.168.1.100 | | Switch > other computers and devices > gateway 192.168.1.110
I want to send all internal traffic through 192.168.1.110, all external
traffic
through 192.168.1.111, then back through 192.168.1.110.
[Thomas E Dukes] The above needs a little clarification: all external traffic through 192.168.1.111 > 192.168.1.110> all other computers and devices.
I did an iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
Issues:
Outside connectivity for all other computers and devices only works if
eth0 is
also connected to the router, server works Iptraf shows no traffic on eth1
Hope I haven't confused you as I have thoroughly confused myself.
TIA
TE Dukes
CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
In article 003101d205da$b35b9a20$1a12ce60$@palmettoshopper.com, TE Dukes tdukes@palmettoshopper.com wrote:
Hello,
I've been working on this for over a week. I don't think its working the way it should.
Here's what I'm trying to do:
I have a Windstream dsl router with wireless > 192.168.1.100 | | Centos 6.8 server eth0 > 192.168.1.110 > gateway 192.168.1.111 eth1 > 192.168.1.111 > gateway 192.168.1.100 | | Switch > other computers and devices > gateway 192.168.1.110
I want to send all internal traffic through 192.168.1.110, all external traffic through 192.168.1.111, then back through 192.168.1.110.
[Thomas E Dukes] The above needs a little clarification: all external traffic through 192.168.1.111 > 192.168.1.110> all other computers and devices.
Assuming your subnet mask is 255.255.255.0, you have both interfaces on the same subnet, which won't work. You have two options:
1. Change the third number on the DSL router and on eth1, e.g. 192.168.2.100 and 192.168.2.111
2. Change the third number on eth0 and all the other computers and devices.
Either of the above options will work. Choose whichever gives you least hassle.
You need to make sure that all of the other devices have the address of your server's eth0 set as their default gateway. The server needs to have the address of the router as its default gateway.
If the other devices want to get their addresses via DHCP (a good idea), you will need to run a DHCP server on your server machine, as they will be isolated from the router.
You will also need to make sure IP forwarding is enabled on the server.
Cheers Tony
On 09/03/2016 01:31 PM, TE Dukes wrote:
Centos 6.8 server eth0 > 192.168.1.110 > gateway 192.168.1.111 eth1 > 192.168.1.111 > gateway 192.168.1.100 | | Switch > other computers and devices > gateway 192.168.1.110
I want to send all internal traffic through 192.168.1.110, all external traffic through 192.168.1.111, then back through 192.168.1.110.
As far as i understand, you have two interfaces in the same subnet.
This is usually a bad idea.
best regards Ulf Volmer