Test UDP
This commit is contained in:
parent
8b62e39d1b
commit
aaa0bfede2
2 changed files with 10 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
networking.firewall.extraCommands = ''
|
networking.firewall.extraCommands = ''
|
||||||
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
||||||
|
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
||||||
|
|
||||||
# TCP PORTS ##################################################################################################
|
# TCP PORTS ##################################################################################################
|
||||||
# PORT 80
|
# PORT 80
|
||||||
|
|
|
@ -23,6 +23,15 @@
|
||||||
networking.firewall.extraCommands = ''
|
networking.firewall.extraCommands = ''
|
||||||
iptables -t nat -A PREROUTING -d 172.234.84.222 -j DNAT --to-destination 10.100.0.2
|
iptables -t nat -A PREROUTING -d 172.234.84.222 -j DNAT --to-destination 10.100.0.2
|
||||||
iptables -t nat -A POSTROUTING -s 10.100.0.2 -j SNAT --to-source 172.234.84.222
|
iptables -t nat -A POSTROUTING -s 10.100.0.2 -j SNAT --to-source 172.234.84.222
|
||||||
|
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
||||||
|
|
||||||
|
# PORT 10000
|
||||||
|
iptables -t nat -A PREROUTING -p udp --dport 10000 -j DNAT --to-destination 10.100.0.2
|
||||||
|
iptables -t nat -A POSTROUTING -p udp --dport 10000 -j MASQUERADE
|
||||||
|
|
||||||
|
# PORT 3478
|
||||||
|
iptables -t nat -A PREROUTING -p udp --dport 3478 -j DNAT --to-destination 10.100.0.2
|
||||||
|
iptables -t nat -A POSTROUTING -p udp --dport 3478 -j MASQUERADE
|
||||||
'';
|
'';
|
||||||
|
|
||||||
services.xinetd = {
|
services.xinetd = {
|
||||||
|
|
Loading…
Reference in a new issue