A
A
AttempGame2019-09-29 00:29:22
Debian
AttempGame, 2019-09-29 00:29:22

Network setup, two network cards?

Good afternoon, I have two ports in the server, the first port is a van port, the second port needs to be done so that it is a local network and it has access to the Internet from the first port, how to implement it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
vreitech, 2019-09-29
@fzfx

https://www.google.com/search?q=masquerading+iptables

T
Thiago Alvarez, 2019-09-29
@thiago_alvarez

write this
sudo iptables --flush
sudo iptables --table nat --flush
sudo iptables --delete-chain
sudo iptables --table nat --delete-chain
sudo iptables -A FORWARD -i eth0 -o eth1 -s 192.168.1.0 /24 (set your LAN network address) -m conntrack --ctstate NEW -j ACCEPT
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A POSTROUTING -t nat -j MASQUERADE
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"

R
Ruslan, 2019-10-23
@msHack

install kerio pfsense

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question